[cfe-dev] CXCursor_CXXBaseSpecifier for template instantiated base class
Nestal Wan via cfe-dev
cfe-dev at lists.llvm.org
Sat Mar 11 20:09:14 PST 2017
Hi,
When I use clang_visitChildren() to visit a class, I can't get a
CXCursor_CXXBaseSpecifier for its base class if the base class is a
template. For example:
template <typename BaseType>
class RecursiveBase : public BaseType
{
public:
virtual void SomeFunc()
{
// prevent optimizer to remove the function
global_var++;
}
};
class Derived : public RecursiveBase<Base>, public Base2, public Base3
{
public:
Derived() = default;
void Func() override {}
};
I can get a CXCursor_CXXBaseSpecifier cursor as children of the
"Derived" cursor, but not RecursiveBase. How can I find out references
to all base classes including templates?
Thanks.
Nestal
More information about the cfe-dev
mailing list