[clang] [Clang] disallow attributes on void parameters (PR #124920)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 29 06:17:12 PST 2025


================
@@ -453,3 +453,12 @@ namespace P2361 {
 }
 
 alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}}
+
+namespace GH108819 {
+void a([[maybe_unused]] void) {}                 // expected-error {{an attribute list cannot appear here}} \
----------------
a-tarasyuk wrote:

Thanks for the feedback, I'll check `SemaDeclAttr`. should a different message be used here instead?

https://github.com/llvm/llvm-project/pull/124920


More information about the cfe-commits mailing list