Author: jlebar Date: Fri Oct 28 11:46:39 2016 New Revision: 285412 URL: http://llvm.org/viewvc/llvm-project?rev=285412&view=rev Log: 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. Modified: cfe/trunk/lib/AST/Decl.cpp Modified: cfe/trunk/lib/AST/Decl.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=285412&r1=285411&r2=285412&view=diff ============================================================================== --- cfe/trunk/lib/AST/Decl.cpp (original) +++ cfe/trunk/lib/AST/Decl.cpp Fri Oct 28 11:46:39 2016 @@ -2933,7 +2933,7 @@ static bool RedeclForcesDefC99(const Fun /// 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(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits