diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-04-30 23:41:16 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-04-30 23:41:16 +0000 |
commit | 3e653b3628a5485b5a74a2323e84480eba8678ee (patch) | |
tree | 7d7a50c32ec01f4f207fabfd042ed4b9578387b2 /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | fa139cd3bd48e02a5b8a79338365bb3462a0c869 (diff) | |
download | bcm5719-llvm-3e653b3628a5485b5a74a2323e84480eba8678ee.tar.gz bcm5719-llvm-3e653b3628a5485b5a74a2323e84480eba8678ee.zip |
clang_getCursorLexicalParent should return a translation unit cursor for declarations at the global scope, from Evan P. Fixes PR9083.
llvm-svn: 155858
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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: |