diff options
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index d322ebd410..6cd9230326 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/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(); |