diff options
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index ad3f1df105..d29e459827 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -476,7 +476,8 @@ CursorVisitor::getPreprocessedEntities() { /// \returns true if the visitation should be aborted, false if it /// should continue. bool CursorVisitor::VisitChildren(CXCursor Cursor) { - if (clang_isReference(Cursor.kind)) { + if (clang_isReference(Cursor.kind) && + Cursor.kind != CXCursor_CXXBaseSpecifier) { // By definition, references have no children. return false; } @@ -542,6 +543,14 @@ bool CursorVisitor::VisitChildren(CXCursor Cursor) { return false; } + if (Cursor.kind == CXCursor_CXXBaseSpecifier) { + if (CXXBaseSpecifier *Base = getCursorCXXBaseSpecifier(Cursor)) { + if (TypeSourceInfo *BaseTSInfo = Base->getTypeSourceInfo()) { + return Visit(BaseTSInfo->getTypeLoc()); + } + } + } + // Nothing to visit at the moment. return false; } |