From: Justin Lebar Date: Fri, 28 Oct 2016 16:46:39 +0000 (+0000) Subject: Relax assertion in FunctionDecl::doesDeclarationForceExternallyVisibleDefinition. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4934a67bb109b757a0c182963666400db1c45d83;p=clang Relax assertion in FunctionDecl::doesDeclarationForceExternallyVisibleDefinition. Previously we were asserting that this declaration doesn't have a body *and* won't have a body after we continue parsing. This is too strong and breaks the go-bindings test during codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285412 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 7898b075d5..f676a9d48f 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -2933,7 +2933,7 @@ static bool RedeclForcesDefC99(const FunctionDecl *Redecl) { /// of redeclarations of the given functions causes /// isInlineDefinitionExternallyVisible to change from false to true. bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const { - assert(!doesThisDeclarationHaveABody() && !willHaveBody() && + assert(!doesThisDeclarationHaveABody() && "Must have a declaration without a body."); ASTContext &Context = getASTContext();