diff options
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 42adfa1cbc..4fda8bc313 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -260,7 +260,7 @@ void CursorVisitor::visitDeclsFromFileRegion(FileID File, // If we didn't find any file level decls for the file, try looking at the // file that it was included from. - while (Decls.empty()) { + while (Decls.empty() || Decls.front()->isTopLevelDeclInObjCContainer()) { bool Invalid = false; const SrcMgr::SLocEntry &SLEntry = SM.getSLocEntry(File, &Invalid); if (Invalid) |