In the code below I would expect the CXXRecordDecls for BaseClass1 to have the same Type as both base class specifiers.
When I use getTypeForDecl() on the CXXRecordDecls I get the same Type*. When I use getType().getTypePtr() on the two CXXBaseSpecifiers I get different a Type* for each one, neither of which is the same as the CXXRecordDecl’s Type*.
Namespace N {
class BaseClass1;
}
class N::BaseClass1 {
};
class DerivedClass1 : public N::BaseClass1 {
};
class DerivedClass2 : public ::N::BaseClass1 {
};
This seems to indicate to me that the declared/defined class is of a different type from the base specifiers, and the base specifiers differ in type from each other.
What am I doing wrong with this? I really just want to see if the CXXBaseSpecifier matches the CXXRecordDecl.