[clang] [Clang][Parser] Reject unbalanced unknown attribute arguments (PR #220259)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 06:18:41 PDT 2026
================
@@ -827,7 +827,8 @@ def err_using_attribute_ns_conflict : Error<
def err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
def err_keyword_not_allowed : Error<"%0 cannot appear here">;
def ext_unbalanced_attribute_args : ExtWarn<
- "attribute argument list is not a balanced token sequence">, InGroup<Pedantic>;
+ "attribute argument list is not a balanced token sequence">,
+ InGroup<DiagGroup<"unbalanced-attribute-args">>;
----------------
AaronBallman wrote:
I think `ExtWarn` should become `Extension` and that's all that's necessary. Then it's disabled by default, but enabled via `-pedantic` but can be opted out of via `-Wno-unbalanced-attribute-args`. WDYT?
https://github.com/llvm/llvm-project/pull/220259
More information about the cfe-commits
mailing list