================
@@ -105,9 +105,8 @@ namespace BadSpecifiers {
// defining-type-specifiers other than cv-qualifiers and 'auto'
S [a] = s; // expected-error {{cannot be declared with type 'S'}}
decltype(auto) [b] = s; // expected-error {{cannot be declared with type
'decltype(auto)'}}
- auto ([c2]) = s; // cxx17-error {{structured binding declaration cannot be
declared with parenthese}} \
- // post2b-error {{use of undeclared identifier 'c2'}} \
- // post2b-error {{expected body of lambda expression}} \
+ auto ([c2]) = s; // expected-error {{use of undeclared identifier 'c2'}} \
----------------
AaronBallman wrote:
This matches GCC but the diagnostic behavior is worse IMO because this is still
a gramatically invalid declaration for a structured binding, so the lookup
error isn't helpful. I think we should add a FIXME comment.
https://github.com/llvm/llvm-project/pull/200675
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits