Every class as parsed by Clang has a forward declaration of itself as a member:
class A {
class A;
...
}
but when the parser generates this it ensures that the RecordTypes for the two
are the same. This makes (among other things) inheritance work. This patch
fixes a bug where the ASTImporter generated two separate RecordTypes when
importing the class and the contained forward declaration, and adds a test case.
Thanks to Doug Gregor for advice on this.
llvm-svn: 269551
8 lines
56 B
C++
8 lines
56 B
C++
class A
|
|
{
|
|
public:
|
|
int x;
|
|
A(int _x) : x(_x) {
|
|
}
|
|
};
|