summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAccess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
-rw-r--r--clang/lib/Sema/SemaAccess.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index d322ebd4100..6cd92303268 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/lib/Sema/SemaAccess.cpp
@@ -1652,7 +1652,7 @@ void Sema::CheckLookupAccess(const LookupResult &R) {
/// \param Class the class/context from which to start the search
/// \return true if the Decl is accessible from the Class, false otherwise.
bool Sema::IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *Class) {
- if (!Class)
+ if (!Class || !Decl->isCXXClassMember())
return true;
QualType qType = Class->getTypeForDecl()->getCanonicalTypeInternal();
OpenPOWER on IntegriCloud