From 3e653b3628a5485b5a74a2323e84480eba8678ee Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 30 Apr 2012 23:41:16 +0000 Subject: clang_getCursorLexicalParent should return a translation unit cursor for declarations at the global scope, from Evan P. Fixes PR9083. llvm-svn: 155858 --- clang/lib/Sema/SemaCodeComplete.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Sema/SemaCodeComplete.cpp') diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 722b2321608..6536d9f522b 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -2842,6 +2842,7 @@ CXCursorKind clang::getCursorKindForDecl(Decl *D) { case Decl::ClassTemplatePartialSpecialization: return CXCursor_ClassTemplatePartialSpecialization; case Decl::UsingDirective: return CXCursor_UsingDirective; + case Decl::TranslationUnit: return CXCursor_TranslationUnit; case Decl::Using: case Decl::UnresolvedUsingValue: -- cgit v1.2.3