[clang] [Clang] prevent crash on unterminated __has_embed (PR #163107)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 14 07:49:59 PDT 2025
================
@@ -250,3 +250,35 @@
#if __has_embed("") // expected-error {{empty filename}}
#endif
+
+// expected-error at +9 {{unterminated conditional directive}}
+// expected-error at +13 {{unterminated conditional directive}}
+// expected-error at +17 {{unterminated conditional directive}}
+// expected-error at +21 {{unterminated conditional directive}}
+// expected-error at +25 {{unterminated conditional directive}}
----------------
a-tarasyuk wrote:
>From how both approaches behave, I’d say yes — I think creating new files for these tests doesn’t make sense, and I found a way to do it with `split-file`.
https://github.com/llvm/llvm-project/pull/163107
More information about the cfe-commits
mailing list