Don't crash in Sema::IsSimplyAccessible if the declaration is not a C++ class member. Fixes PR11108.

llvm-svn: 141600
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index d322ebd..6cd9230 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/lib/Sema/SemaAccess.cpp
@@ -1652,7 +1652,7 @@
 /// \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();