diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-23 23:00:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-23 23:00:57 +0000 |
commit | 58ddb60f409125eda5436c4a1f070f7fa4744295 (patch) | |
tree | e0c5fc04d2a54195f63229279e5089ffbca81592 /lib/Frontend/ASTUnit.cpp | |
parent | d097be8f81fbf4ed96ac10bae18562dd8202666b (diff) |
Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 14ff75d5c6..8a15f92045 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -194,6 +194,7 @@ void ASTUnit::CacheCodeCompletionResults() { IsNestedNameSpecifier); CachedResult.Priority = Results[I].Priority; CachedResult.Kind = Results[I].CursorKind; + CachedResult.Availability = Results[I].Availability; // Keep track of the type of this completion in an ASTContext-agnostic // way. @@ -280,6 +281,7 @@ void ASTUnit::CacheCodeCompletionResults() { CachedResult.Priority = Results[I].Priority; CachedResult.Kind = Results[I].CursorKind; + CachedResult.Availability = Results[I].Availability; CachedResult.TypeClass = STC_Void; CachedResult.Type = 0; CachedCompletionResults.push_back(CachedResult); @@ -1644,7 +1646,8 @@ void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S, } } - AllResults.push_back(Result(C->Completion, Priority, C->Kind)); + AllResults.push_back(Result(C->Completion, Priority, C->Kind, + C->Availability)); } // If we did not add any cached completion results, just forward the |