[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 24 10:23:04 PDT 2025
================
@@ -2427,9 +2438,16 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType,
// Complex promotion (Clang extension)
SCS.Second = ICK_Complex_Promotion;
FromType = ToType.getUnqualifiedType();
+ } else if (S.IsOverflowBehaviorTypePromotion(FromType, ToType)) {
+ // OverflowBehaviorType promotions
+ SCS.Second = ICK_Integral_Promotion;
+ FromType = ToType.getUnqualifiedType();
----------------
JustinStitt wrote:
As per the documentation and previously agreed upon semantics, these overflow behavior types have special promotion properties. We do this to preserve bitwidths when it matters.
https://github.com/llvm/llvm-project/pull/148914
More information about the cfe-commits
mailing list