aaron.ballman added a comment.
CI still seems unhappy:
Failed Tests (1):
Clang :: Sema/warn-unused-parameters.c
================
Comment at:
clang-tools-extra/test/clang-tidy/checkers/misc-unused-parameters.cpp:290-292
+// Do not warn on naked functions.
+[[gnu::naked]] int nakedFunction(int a, float b, const char *c) { ; }
+__attribute__((naked)) void nakedFunction(int a, int b) { ; }
----------------
Quuxplusone wrote:
> In C++, I would expect the programmer to fix the (correct) warning simply by
> eliminating the unused parameter names:
> ```
> [[gnu::naked]] int nakedFunction(int, float, const char *) { ; }
> __attribute__((naked)) void nakedFunction(int, int) { ; }
> ```
I wouldn't expect that consistently. I'd expect the programmer to see "unused
parameter, oh, I should remove that" at least some significant percentage of
the time, but with mixed results.
I think silencing the warning is a reasonable behavior in the presence of the
attribute. Naked functions are pretty strange beasts to begin with.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116778/new/
https://reviews.llvm.org/D116778
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits