[cfe-commits] r143618 - /cfe/trunk/lib/Sema/SemaAccess.cpp

Douglas Gregor dgregor at apple.com
Thu Nov 3 10:41:55 PDT 2011


Author: dgregor
Date: Thu Nov  3 12:41:55 2011
New Revision: 143618

URL: http://llvm.org/viewvc/llvm-project?rev=143618&view=rev
Log:
Class can't be null in this context

Modified:
    cfe/trunk/lib/Sema/SemaAccess.cpp

Modified: cfe/trunk/lib/Sema/SemaAccess.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaAccess.cpp?rev=143618&r1=143617&r2=143618&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaAccess.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAccess.cpp Thu Nov  3 12:41:55 2011
@@ -1653,7 +1653,7 @@
 /// \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();





More information about the cfe-commits mailing list