llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/main.cpp

17 lines
200 B
C++

class Foo {
public:
int a;
int b;
virtual int Sum() { return a + b; }
};
struct Foo *GetAFoo() {
return (struct Foo*)0;
}
int main() {
struct Foo *foo = GetAFoo();
return foo->Sum();
}