[clang] [clang][ExprConstant] Reject integral casts of addr-label-diffs... (PR #171437)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 11 07:56:40 PST 2025


================
@@ -12,7 +12,7 @@
 
 // CHECK:  |   |-value: AddrLabelDiff &&l2 - &&l1
 int Test(void) {
-  constexpr char ar = &&l2 - &&l1;
+  constexpr long long ar = &&l2 - &&l1;
----------------
AaronBallman wrote:

I was basing this off the patch description saying: `Reject integral casts of addr-label-diffs if the result is narrower than 32 bits.` ;-)

https://github.com/llvm/llvm-project/pull/171437


More information about the cfe-commits mailing list