Fix assert.

llvm-svn: 69961
This commit is contained in:
Anders Carlsson 2009-04-24 06:06:07 +00:00
parent b17a2c3d8f
commit 643e0a40db
1 changed files with 4 additions and 2 deletions

View File

@ -377,8 +377,10 @@ StaticAssertDecl::~StaticAssertDecl() {
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);
}