From 0cf157db98b832e8715026333aab08a3a7c96b16 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 3 Jul 2013 19:08:10 +0000 Subject: [PATCH] Pull in r185446 from clang trunk: Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout. Reported by: glebius --- contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp index f72bec0aa147..fd7cfeb6f0da 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp @@ -10296,7 +10296,8 @@ void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD, Tag->setTopLevelDeclInObjCContainer(); // Notify the consumer that we've defined a tag. - Consumer.HandleTagDeclDefinition(Tag); + if (!Tag->isInvalidDecl()) + Consumer.HandleTagDeclDefinition(Tag); } void Sema::ActOnObjCContainerFinishDefinition() {