================
@@ -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));
----------------
cor3ntin wrote:

FYI, C23 has the behavior that I expected C++ to have 
https://compiler-explorer.com/z/YTzMq6Geh
C++ only complain about narrowing with braces init list.
It seems intended but it is a very odd behavior 
We still have a bug of duplicated warning 
https://compiler-explorer.com/z/958dfG3G5

https://github.com/llvm/llvm-project/pull/89565
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to