[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)
Daniel M. Katz via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 08:50:08 PDT 2024
================
@@ -16548,11 +16548,10 @@ static void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
std::string PrettySourceValue = toString(Value, 10);
std::string PrettyTargetValue = PrettyPrintInRange(Value, TargetRange);
- S.DiagRuntimeBehavior(
- E->getExprLoc(), E,
- S.PDiag(diag::warn_impcast_integer_precision_constant)
- << PrettySourceValue << PrettyTargetValue << E->getType() << T
- << E->getSourceRange() << SourceRange(CC));
----------------
katzdm wrote:
@cor3ntin Do you think any changes to diagnostics need to happen in this PR, or are you okay with the warning applying during constant evaluation?
https://github.com/llvm/llvm-project/pull/89565
More information about the cfe-commits
mailing list