xbolva00 marked 2 inline comments as done. xbolva00 added inline comments.
================ Comment at: clang/lib/AST/ExprConstant.cpp:10595 + const auto *Callee = Info.CurrentCall->getCallee(); + if (Info.InConstantContext && !Info.CheckingPotentialConstantExpression && + (Info.CallStackDepth == 1 || ---------------- !Info.CheckingPotentialConstantExpression Basically just to silence test case: namespace std { constexpr bool is_constant_evaluated() noexcept { return __builtin_is_constant_evaluated(); } } In real world code, this will not warn, since call's loc is in system header. Leave it? ================ Comment at: clang/lib/AST/ExprConstant.cpp:10600 + Callee->getIdentifier()->isStr("is_constant_evaluated")))) { + if (Info.EvalStatus.Diag) + Info.report((Info.CallStackDepth == 1) ? E->getExprLoc() ---------------- Without this condition, it warns 3 times for if constexpr (std::is_constant_evaluated() == false) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69518/new/ https://reviews.llvm.org/D69518 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits