diff options
-rw-r--r-- | tools/CIndex/CIndex.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp index a2719f6fdd..cb870c9da4 100644 --- a/tools/CIndex/CIndex.cpp +++ b/tools/CIndex/CIndex.cpp @@ -513,6 +513,8 @@ CXCursor clang_getCursor(CXTranslationUnit CTUnit, const char *source_name, ASTLocation ALoc = ResolveLocationInAST(CXXUnit->getASTContext(), SLoc); Decl *Dcl = ALoc.getParentDecl(); + if (ALoc.isNamedRef()) + Dcl = ALoc.AsNamedRef().ND; Stmt *Stm = ALoc.dyn_AsStmt(); if (Dcl) { if (Stm) { |