[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 18 05:05:55 PST 2025


================
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error<
   "the name of the capture">;
 def err_lambda_capture_multiple_ellipses : Error<
   "multiple ellipses in pack capture">;
+def err_binding_multiple_ellipses : Error<
+  "multiple packs in structured binding declaration">;
+def note_previous_ellipsis : Note<
+  "previous binding pack specified here">;
+def ext_cxx_binding_pack : ExtWarn<
----------------
cor3ntin wrote:

We need a corresponding warning to display in c++26 mode

for example 
```cpp
Diag(LambdaBeginLoc, getLangOpts().CPlusPlus11
                             ? diag::warn_cxx98_compat_lambda
                             : diag::ext_lambda)
```

(look at other `ext_` diags for more example)

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


More information about the cfe-commits mailing list