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 | 8e5900c8e9bd32bcc385124f564f3d38a11d0e28 (patch) | |
tree | bc9b03b6520705abb70b9a62b87239141c027d2b /lib/Sema/SemaCodeComplete.cpp | |
parent | aa5498649c7ad1b61e5da2497e8c60c924ac5e55 (diff) |
clang_getCursorLexicalParent should return a translation unit cursor for declarations at the global scope, from Evan P. Fixes PR9083.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 722b232160..6536d9f522 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/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: |