[clang] [Clang] disallow attributes on void parameters (PR #124920)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 31 05:44:28 PST 2025
================
@@ -3830,6 +3830,8 @@ 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">, InGroup<IgnoredAttributes>;
----------------
AaronBallman wrote:
```suggestion
"attribute %0 cannot be applied to a 'void' parameter">,
InGroup<IgnoredAttributes>;
```
https://github.com/llvm/llvm-project/pull/124920
More information about the cfe-commits
mailing list