[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:29 PST 2025
================
@@ -90,7 +90,7 @@ struct testSubset1Struct { };
#pragma clang attribute pop
-#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = variable)
+#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = variable) // expected-warning {{attribute 'abi_tag' cannot be applied to a 'void' parameter}}
----------------
AaronBallman wrote:
```suggestion
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = variable)
// expected-warning at -1 {{attribute 'abi_tag' cannot be applied to a 'void' parameter}}
```
Same changes elsewhere; just keeps the line length more reasonable when reading the tests.
https://github.com/llvm/llvm-project/pull/124920
More information about the cfe-commits
mailing list