diff options
author | Erik Verbruggen <erikjv@me.com> | 2011-10-06 07:27:49 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2011-10-06 07:27:49 +0000 |
commit | 2e657ffd8e219c8521098944a7f6f7d91bc2d903 (patch) | |
tree | f3035a65a3e481aed674371bba8b3f0dd05c77a2 /clang/lib/Sema/CodeCompleteConsumer.cpp | |
parent | cddafd3969977630d9bbec724dd09b6cb97fd9fd (diff) | |
download | bcm5719-llvm-2e657ffd8e219c8521098944a7f6f7d91bc2d903.tar.gz bcm5719-llvm-2e657ffd8e219c8521098944a7f6f7d91bc2d903.zip |
Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.
llvm-svn: 141278
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | clang/lib/Sema/CodeCompleteConsumer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp index 3db9e4dcd52..ab699382e6b 100644 --- a/clang/lib/Sema/CodeCompleteConsumer.cpp +++ b/clang/lib/Sema/CodeCompleteConsumer.cpp @@ -376,7 +376,7 @@ PrintingCodeCompleteConsumer::ProcessOverloadCandidates(Sema &SemaRef, } } -void CodeCompletionResult::computeCursorKindAndAvailability() { +void CodeCompletionResult::computeCursorKindAndAvailability(bool Accessible) { switch (Kind) { case RK_Declaration: // Set the availability based on attributes. @@ -418,6 +418,9 @@ void CodeCompletionResult::computeCursorKindAndAvailability() { // Do nothing: Patterns can come with cursor kinds! break; } + + if (!Accessible) + Availability = CXAvailability_NotAccessible; } /// \brief Retrieve the name that should be used to order a result. |