[cfe-dev] CXXBaseSpecifiers not returning same Type

Daniel Dilts diltsman at gmail.com
Tue Jul 1 11:02:10 PDT 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140701/01877b48/attachment.html>


More information about the cfe-dev mailing list