summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-23 23:00:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-23 23:00:57 +0000
commitf757a12dfc91b3ac8464ba2c9971d92e4bfafbec (patch)
treee52d519b2d3cf34dbab08bde2054153f9eb2a5d6 /clang/lib/Frontend/ASTUnit.cpp
parent616d3e71c24e2e724d83a2f3f4d885310e6fe479 (diff)
downloadbcm5719-llvm-f757a12dfc91b3ac8464ba2c9971d92e4bfafbec.tar.gz
bcm5719-llvm-f757a12dfc91b3ac8464ba2c9971d92e4bfafbec.zip
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. llvm-svn: 111858
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 14ff75d5c6b..8a15f92045e 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud