[clang] [Clang][C2y] Add support for if declarations (N3356 paper) (PR #198244)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 22 12:14:06 PDT 2026
================
@@ -169,6 +169,15 @@ def ext_c2y_generic_with_type_arg : Extension<
def warn_c2y_compat_generic_with_type_arg : Warning<
"passing a type argument as the first operand to '_Generic' is incompatible "
"with C standards before C2y">, InGroup<CPre2yCompat>, DefaultIgnore;
+def warn_c2y_empty_declaration_statement : Warning<
+ "empty declaration statement of '%select{if|switch}0' has no effect">,
+ InGroup<C2y>;
----------------
Sirraide wrote:
The `C2y` group is specifically for compatibility diagnostics; general diagnostics that just happen to be for a C2y feature should not be in this group.
https://github.com/llvm/llvm-project/pull/198244
More information about the cfe-commits
mailing list