]> granicus.if.org Git - clang/commitdiff
Class can't be null in this context
authorDouglas Gregor <dgregor@apple.com>
Thu, 3 Nov 2011 17:41:55 +0000 (17:41 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 3 Nov 2011 17:41:55 +0000 (17:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143618 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaAccess.cpp

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