[cfe-commits] r69961 - /cfe/trunk/lib/AST/DeclCXX.cpp

Anders Carlsson andersca at mac.com
Thu Apr 23 23:06:08 PDT 2009


Author: andersca
Date: Fri Apr 24 01:06:07 2009
New Revision: 69961

URL: http://llvm.org/viewvc/llvm-project?rev=69961&view=rev
Log:
Fix assert.

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

Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=69961&r1=69960&r2=69961&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Fri Apr 24 01:06:07 2009
@@ -377,8 +377,10 @@
 
 CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC,
                                        QualType T) {
-  assert(isa<CXXRecordDecl>(T->getAsRecordType()->getDecl()) &&
-         "CXXTempVarDecl must have a C++ record type!");
+  assert(T->isDependentType() || 
+         isa<CXXRecordDecl>(T->getAsRecordType()->getDecl()) &&
+         "CXXTempVarDecl must either have a dependent type "
+         "or a C++ record type!");
   return new (C) CXXTempVarDecl(DC, T);
 }
 





More information about the cfe-commits mailing list