From 5bbbeafa4456312f3e868737c0197fb210e64d09 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 6 Jul 2013 22:51:56 +0000 Subject: [PATCH] MFC r252587: Pull in r185446 from clang trunk: Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout. Reported by: glebius git-svn-id: svn://svn.freebsd.org/base/stable/9@252901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- 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 f72bec0aa..fd7cfeb6f 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() { -- 2.45.0