mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-22 21:15:40 -04:00

Summary: When we have a artificial constructor DIE, we currently create from that a global function with the name of that class. That ends up causing a bunch of funny errors such as "must use 'struct' tag to refer to type 'Foo' in this scope" when doing `Foo f`. Also causes that constructing a class via `Foo()` actually just calls that global function. The fix is that when we have an artificial method decl, we always treat it as handled even if we don't create a CXXMethodDecl for it (which we never do for artificial methods at the moment). Fixes rdar://55757491 and probably some other radars. Reviewers: aprantl, vsk, shafik Reviewed By: aprantl Subscribers: jingham, shafik, labath, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68130 llvm-svn: 375151
19 lines
270 B
C++
19 lines
270 B
C++
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
|
|
}
|