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 | d12059673dcef32bc2b6bae5321654d33863afe6 (patch) | |
tree | ab758c88fd4c47be76385950000fcd057c541c2f /lib/Sema/CodeCompleteConsumer.cpp | |
parent | aed123ec3cc37e457fe20a6158fdadf8849ad916 (diff) |
Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | lib/Sema/CodeCompleteConsumer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp index 3db9e4dcd5..ab699382e6 100644 --- a/lib/Sema/CodeCompleteConsumer.cpp +++ b/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. |