[clang] [Clang][Lex] Implement CWG3013: Error if #embed parameters were defined as macros (PR #224769)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 21 22:15:36 PDT 2026
================
@@ -492,6 +492,14 @@ def warn_compat_pp_embed_directive : Warning<
InGroup<CPre23Compat>, DefaultIgnore;
def err_pp_embed_dup_params : Error<
"cannot specify parameter '%0' twice in the same '#embed' directive">;
+def err_pp_embed_parameter_is_macro : Error<
+ "cannot use %0 as %select{an '#embed'|a '__has_embed'}1 parameter if also"
+ " defined as a macro">;
+def warn_c_pp_embed_parameter_is_macro : Warning<
----------------
zwuis wrote:
If I remember correctly warnings with `ExtWarn` are controlled by `-Wpedantic`.
https://github.com/llvm/llvm-project/pull/224769
More information about the cfe-commits
mailing list