[cfe-commits] r65076 - /cfe/trunk/lib/Sema/SemaDecl.cpp
Chris Lattner
sabre at nondot.org
Thu Feb 19 15:13:55 PST 2009
Author: lattner
Date: Thu Feb 19 17:13:55 2009
New Revision: 65076
URL: http://llvm.org/viewvc/llvm-project?rev=65076&view=rev
Log:
GetTypeForDeclarator can return null on error now, handle this.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=65076&r1=65075&r2=65076&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Feb 19 17:13:55 2009
@@ -1376,7 +1376,10 @@
PrevDecl = 0;
QualType R = GetTypeForDeclarator(D, S);
- assert(!R.isNull() && "GetTypeForDeclarator() returned null type");
+ if (R.isNull()) {
+ InvalidDecl = true;
+ R = Context.IntTy;
+ }
bool Redeclaration = false;
if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) {
More information about the cfe-commits
mailing list