aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-05 02:30:54 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-05 02:30:54 +0000
commitd79093af384ac0ea78f4237a001eae7467e06a61 (patch)
tree0cd1893ec8167f9049d92f4f498aec38e12aac8d /lib/Sema/SemaDecl.cpp
parent94010695f7fce626e41ef045b60def9c912e9ce8 (diff)
constexpr: Implement DR1358: An instantiation of a constexpr function which
can't produce a constant expression is not ill-formed (so long as some instantiation of that function can produce a constant expression). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 6b92b0ad67..172e931153 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -7302,7 +7302,7 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body,
}
if (FD && FD->isConstexpr() && !FD->isInvalidDecl() &&
- !CheckConstexprFunctionBody(FD, Body))
+ !CheckConstexprFunctionBody(FD, Body, IsInstantiation))
FD->setInvalidDecl();
assert(ExprCleanupObjects.empty() && "Leftover temporaries in function");