================
@@ -94,6 +94,9 @@ char buffer[] = {
 #embed "embed_parsing_errors.c" prefix() // OK: tokens within parens are 
optional
 #embed "embed_parsing_errors.c" prefix)
 // expected-error@-1 {{expected '('}}
+#embed "embed_parsing_errors.c" prefix()) // expected-error {{expected 
identifier}}
+#embed "embed_parsing_errors.c" prefix(]) // expected-error {{expected ')'}}
----------------
a-tarasyuk wrote:

@Fznamznon  Thanks for the feedback. I’ve considered that, however, from my 
understanding, the `#embed` parser doesn't specifically expect an identifier 
after `prefix(`/`sufix(`/`if_empty` — it accepts various tokens until the 
closing `)`. A `]` or `}` is not a valid closing token for 
`prefix`/`suffix`/`if_empty`, so it’s treated as an unmatched closer, which 
triggers `expected ')'` to guide the user to the closing parenthesis. WDYT?

https://github.com/llvm/llvm-project/pull/152877
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to