[clang] [Clang] disallow attributes on void parameters (PR #124920)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 08:33:10 PST 2025
================
@@ -53,3 +53,14 @@ alignas(4) auto PR19252 = 0;
// Check the diagnostic message
class alignas(void) AlignasVoid {}; // expected-error {{invalid application of 'alignas' to an incomplete type 'void'}}
+
+namespace GH108819 {
+void a([[maybe_unused]] void) {} // expected-warning {{attribute 'maybe_unused' cannot be applied to a 'void' parameter}}\
----------------
AaronBallman wrote:
Shafik's availability may be odd this week because of WG21 meetings in Hagenberg. The new test cases look good to me, so I think you're fine to land the PR and we can address any additional test coverage needs post-commit if Shafik has other cases in mind.
https://github.com/llvm/llvm-project/pull/124920
More information about the cfe-commits
mailing list