[PATCH] D116778: [clang-tidy][clang] Don't trigger unused-parameter warnings on naked functions
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 14 11:52:12 PST 2022
Quuxplusone added inline comments.
================
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) { ; }
----------------
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) { ; }
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116778/new/
https://reviews.llvm.org/D116778
More information about the cfe-commits
mailing list