[clang] [Clang][AST] Fix extending an unsigned to signed in `ExprConstant.cpp` (PR #180563)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 26 06:57:29 PST 2026


================
@@ -476,6 +477,10 @@ struct PR45298Consumer {
 
   PR45298<T> s;
 };
+
+constexpr int PR180563(int __attribute__((vector_size(8))) v) {
+  return v[~0UL];
+}
----------------
AaronBallman wrote:

You should add a call to the constexpr function so that the constexpr engine is definitely run on it; a `static_assert` would work. I'd expect to still get a diagnostic: https://godbolt.org/z/Yhv6qKss4

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


More information about the cfe-commits mailing list