summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/CodeCompleteConsumer.cpp
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-12-03 13:29:17 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-12-03 13:29:17 +0000
commitf1822ec431cded5e50b69152346794d79976a8b2 (patch)
tree367d6815eb69d834b7d7236ed170ddc9b5cb6d56 /clang/lib/Sema/CodeCompleteConsumer.cpp
parent6ef089d21c8853d4623980617f18490ab64c8548 (diff)
downloadbcm5719-llvm-f1822ec431cded5e50b69152346794d79976a8b2.tar.gz
bcm5719-llvm-f1822ec431cded5e50b69152346794d79976a8b2.zip
[CodeComplete] Cleanup access checking in code completion
Summary: Also fixes a crash (see the added 'accessibility-crash.cpp' test). Reviewers: ioeric, kadircet Reviewed By: kadircet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55124 llvm-svn: 348135
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r--clang/lib/Sema/CodeCompleteConsumer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp
index f6a959c2454..40db8493978 100644
--- a/clang/lib/Sema/CodeCompleteConsumer.cpp
+++ b/clang/lib/Sema/CodeCompleteConsumer.cpp
@@ -555,6 +555,9 @@ void PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(
Tags.push_back("Hidden");
if (Results[I].InBaseClass)
Tags.push_back("InBase");
+ if (Results[I].Availability ==
+ CXAvailabilityKind::CXAvailability_NotAccessible)
+ Tags.push_back("Inaccessible");
if (!Tags.empty())
OS << " (" << llvm::join(Tags, ",") << ")";
}
OpenPOWER on IntegriCloud