]> granicus.if.org Git - clang/commitdiff
Relax assertion in FunctionDecl::doesDeclarationForceExternallyVisibleDefinition.
authorJustin Lebar <jlebar@google.com>
Fri, 28 Oct 2016 16:46:39 +0000 (16:46 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 28 Oct 2016 16:46:39 +0000 (16:46 +0000)
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

lib/AST/Decl.cpp

index 7898b075d53f4bb278ae8ca9aa6aac066e31c3b0..f676a9d48f4a2609c8f5fb2191067cfdb7d3783c 100644 (file)
@@ -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();