[PATCH] [PATCH] Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout

Serge Pavlov sepavloff at gmail.com
Mon May 6 06:56:36 PDT 2013


Hi doug.gregor,

Don't pass declaration definition to code generator if the declaration is invalid.

http://llvm-reviews.chandlerc.com/D749

Files:
  lib/Sema/SemaDecl.cpp

Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp
+++ lib/Sema/SemaDecl.cpp
@@ -10295,7 +10295,8 @@
     Tag->setTopLevelDeclInObjCContainer();
 
   // Notify the consumer that we've defined a tag.
-  Consumer.HandleTagDeclDefinition(Tag);
+  if (!Tag->isInvalidDecl())
+    Consumer.HandleTagDeclDefinition(Tag);
 }
 
 void Sema::ActOnObjCContainerFinishDefinition() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D749.1.patch
Type: text/x-patch
Size: 443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130506/9c91dd5e/attachment.bin>


More information about the cfe-commits mailing list