[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 11 04:58:27 PDT 2025
================
@@ -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 at -1 {{expected '('}}
+#embed "embed_parsing_errors.c" prefix()) // expected-error {{expected identifier}}
+#embed "embed_parsing_errors.c" prefix(]) // expected-error {{expected ')'}}
----------------
Fznamznon wrote:
That is a good point. We should probably not say expected identifier for the `(()` case. But that is outside of the scope of this pr, it seems. Thanks!
https://github.com/llvm/llvm-project/pull/152877
More information about the cfe-commits
mailing list