summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/Decl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 235f2778e87..7898b075d53 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/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() &&
+ assert(!doesThisDeclarationHaveABody() && !willHaveBody() &&
"Must have a declaration without a body.");
ASTContext &Context = getASTContext();
@@ -3048,7 +3048,8 @@ const Attr *FunctionDecl::getUnusedResultAttr() const {
/// an externally visible symbol, but "extern inline" will not create an
/// externally visible symbol.
bool FunctionDecl::isInlineDefinitionExternallyVisible() const {
- assert(doesThisDeclarationHaveABody() && "Must have the function definition");
+ assert(doesThisDeclarationHaveABody() ||
+ willHaveBody() && "Must be a function definition");
assert(isInlined() && "Function must be inline");
ASTContext &Context = getASTContext();
OpenPOWER on IntegriCloud