================
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-note@+1 {{to match this '{'}}
+void a(int i) {
+ switch(i) {
+ case 1:
+ // expected-error@+2 {{expected ']'}}
+ // expected-error@+3 {{expected ']'}}
+ [[fallthrough;;
+ case 2:
+ ;
+ };
+ // expected-error@+2 {{expected statement}}
----------------
AmrDeveloper wrote:
- The statement diagnostic is because during parsing the case statement, we
started by parsing the attribute, which moved the cursor to EoF (No ] to skip
to).
- Then after that, we report missing `}` because we have `[` but it's unclosed
https://github.com/llvm/llvm-project/pull/187580
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits