summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp
blob: 87997fa354c3cb0e623e018544e9577f518f9331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Base {
public:
  virtual ~Base() {}
  virtual int foo() { return 1; }
};

class Derived : public Base {
public:
  virtual int foo() { return 2; }
};

int main() {
  Base realbase;
  realbase.foo();
  Derived d;
  Base *b = &d;
  return 0; // Set breakpoint here
}
OpenPOWER on IntegriCloud