[clang] [Clang][Parser] Report error when attribute missing ]] followed by ;; (PR #187580)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 07:41:33 PDT 2026
================
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-note at +1 {{to match this '{'}}
+void a(int i) {
+ switch(i) {
+ case 1:
+ // expected-error at +2 {{expected ']'}}
+ // expected-error at +3 {{expected ']'}}
----------------
erichkeane wrote:
This is a particularly awkward one here, It'd be great if we did a look-ahead and consumed the first `]` if it was followed by 1 so we didn't get this?
https://github.com/llvm/llvm-project/pull/187580
More information about the cfe-commits
mailing list