Skip to content

Commit 2c47041

Browse files
committed
[clang] add -fimplicit-constexpr flag: fix failed tests (I wish we had operator implication)
1 parent cdae12c commit 2c47041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/Interp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {
881881
DiagDecl->hasBody())
882882
return false;
883883

884-
if (F->getDecl()->isConstexprOrImplicitlyCanBe(S.getLangOpts(), false)) {
884+
if (S.getLangOpts().ImplicitConstexpr && !F->getDecl()->isInlined()) {
885885
S.FFDiag(S.Current->getLocation(OpPC),
886886
diag::note_constexpr_implicit_constexpr_must_be_inlined, 1)
887887
<< DiagDecl;

0 commit comments

Comments
 (0)