aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/ResolveLocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Index/ResolveLocation.cpp')
-rw-r--r--lib/Index/ResolveLocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Index/ResolveLocation.cpp b/lib/Index/ResolveLocation.cpp
index 281f4d9df1..37dd94509f 100644
--- a/lib/Index/ResolveLocation.cpp
+++ b/lib/Index/ResolveLocation.cpp
@@ -183,7 +183,7 @@ ASTLocation DeclLocResolver::VisitDeclContext(DeclContext *DC) {
ASTLocation DeclLocResolver::VisitTranslationUnitDecl(TranslationUnitDecl *TU) {
ASTLocation ASTLoc = VisitDeclContext(TU);
- if (ASTLoc.getDecl() == TU)
+ if (ASTLoc.getParentDecl() == TU)
return ASTLocation();
return ASTLoc;
}