aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-03 16:51:37 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-03 16:51:37 +0000
commit17015eff2b3166e445377b15913474b472775e7c (patch)
tree95dede63f7818bc5949e1e5f412bceadc9fd3389 /lib/Sema/SemaCodeComplete.cpp
parentfb35e8f497d180e562e2e1bd8cd4b756b2d4a846 (diff)
Refactor Sema::IsSimplyAccessible slightly, to work on a DeclContext rather than a class
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index f964ec1483..2bff705060 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -1189,11 +1189,9 @@ namespace {
virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
bool InBaseClass) {
bool Accessible = true;
- if (Ctx) {
- if (CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(Ctx))
- Accessible = Results.getSema().IsSimplyAccessible(ND, Class);
- // FIXME: ObjC access checks are missing.
- }
+ if (Ctx)
+ Accessible = Results.getSema().IsSimplyAccessible(ND, Ctx);
+
ResultBuilder::Result Result(ND, 0, false, Accessible);
Results.AddResult(Result, CurContext, Hiding, InBaseClass);
}