[cfe-commits] r96792 - /cfe/trunk/lib/AST/DeclBase.cpp

Douglas Gregor dgregor at apple.com
Mon Feb 22 09:53:38 PST 2010


Author: dgregor
Date: Mon Feb 22 11:53:38 2010
New Revision: 96792

URL: http://llvm.org/viewvc/llvm-project?rev=96792&view=rev
Log:
Don't assert that we have a valid access specifier on an invalid
declaration. This is the trivial part of PR6365.

Modified:
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=96792&r1=96791&r2=96792&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Mon Feb 22 11:53:38 2010
@@ -436,7 +436,8 @@
   //    FunctionDecl)
   // 4. the context is not a record
   if (isa<TranslationUnitDecl>(this) ||
-      !isa<CXXRecordDecl>(getDeclContext()))
+      !isa<CXXRecordDecl>(getDeclContext()) ||
+      isInvalidDecl())
     return;
 
   assert(Access != AS_none &&





More information about the cfe-commits mailing list