Ver Fonte

Class can't be null in this context

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143618 91177308-0d34-0410-b5e6-96231b3b80d8
Douglas Gregor há 14 anos atrás
pai
commit
a885dce496
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      lib/Sema/SemaAccess.cpp

+ 1 - 1
lib/Sema/SemaAccess.cpp

@@ -1653,7 +1653,7 @@ void Sema::CheckLookupAccess(const LookupResult &R) {
 /// \return true if the Decl is accessible from the Class, false otherwise.
 /// \return true if the Decl is accessible from the Class, false otherwise.
 bool Sema::IsSimplyAccessible(NamedDecl *Decl, DeclContext *Ctx) {
 bool Sema::IsSimplyAccessible(NamedDecl *Decl, DeclContext *Ctx) {
   if (CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(Ctx)) {
   if (CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(Ctx)) {
-    if (!Class || !Decl->isCXXClassMember())
+    if (!Decl->isCXXClassMember())
       return true;
       return true;
 
 
     QualType qType = Class->getTypeForDecl()->getCanonicalTypeInternal();
     QualType qType = Class->getTypeForDecl()->getCanonicalTypeInternal();