[cfe-commits] r39637 - /cfe/cfe/trunk/Sema/SemaDecl.cpp

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:46:30 PDT 2007


Author: clattner
Date: Wed Jul 11 11:46:30 2007
New Revision: 39637

URL: http://llvm.org/viewvc/llvm-project?rev=39637&view=rev
Log:
fix a crash parsing spass

Modified:
    cfe/cfe/trunk/Sema/SemaDecl.cpp

Modified: cfe/cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaDecl.cpp?rev=39637&r1=39636&r2=39637&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaDecl.cpp Wed Jul 11 11:46:30 2007
@@ -421,7 +421,7 @@
 Sema::DeclTy *Sema::FinalizeDeclaratorGroup(Scope *S, DeclTy *group) {
   // Often we have single declarators, handle them quickly.
   Decl *Group = static_cast<Decl*>(group);
-  if (Group->getNextDeclarator() == 0) return Group;
+  if (Group == 0 || Group->getNextDeclarator() == 0) return Group;
   
   Decl *NewGroup = 0;
   while (Group) {





More information about the cfe-commits mailing list