[clang] [Clang] Do not allowed narrowing in pack indexing expression. (PR #206040)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 07:55:20 PDT 2026


================
@@ -142,11 +142,11 @@ def err_typecheck_converted_constant_expression_indirect : Error<
 def err_expr_not_cce : Error<
   "%select{case value|enumerator value|non-type template argument|non-type parameter of template template parameter|"
   "array size|explicit specifier argument|noexcept specifier argument|"
-  "call to 'size()'|call to 'data()'}0 is not a constant expression">;
+  "call to 'size()'|call to 'data()'|pack index}0 is not a constant expression">;
 def ext_cce_narrowing : ExtWarn<
   "%select{case value|enumerator value|non-type template argument|non-type parameter of template template parameter|"
   "array size|explicit specifier argument|noexcept specifier argument|"
-  "call to 'size()'|call to 'data()'}0 %select{cannot be narrowed from "
+  "call to 'size()'|call to 'data()'||pack index}0 %select{cannot be narrowed from "
----------------
AaronBallman wrote:

`||` looks like a bug?

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


More information about the cfe-commits mailing list