[clang] [Clang] disallow attributes on void parameters (PR #124920)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 06:31:59 PST 2025
================
@@ -3832,6 +3832,9 @@ def warn_type_attribute_wrong_type : Warning<
"'%0' only applies to %select{function|pointer|"
"Objective-C object or block pointer}1 types; type here is %2">,
InGroup<IgnoredAttributes>;
+def warn_attribute_on_void_param: Warning<
+ "attribute %0 cannot be applied to a 'void' parameter">,
----------------
erichkeane wrote:
Is `'void' parameter` technically correct here? Isn't `(void)` technically an empty parameter list? Can we word this better, or are we ok with the term?
https://github.com/llvm/llvm-project/pull/124920
More information about the cfe-commits
mailing list