From: Douglas Gregor Date: Thu, 3 Nov 2011 17:41:55 +0000 (+0000) Subject: Class can't be null in this context X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a885dce496f2a9e30650f74607efe11856a76a34;p=clang 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 --- diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 83ca553aa6..89538ba905 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/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. bool Sema::IsSimplyAccessible(NamedDecl *Decl, DeclContext *Ctx) { if (CXXRecordDecl *Class = dyn_cast(Ctx)) { - if (!Class || !Decl->isCXXClassMember()) + if (!Decl->isCXXClassMember()) return true; QualType qType = Class->getTypeForDecl()->getCanonicalTypeInternal();