Put declarations/definitions of unused variables under corresponding macros to silence clang warnings.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
i don’t understand why you find this set of changes preferable to decorating some variable declarations with attribute((unused))
Comment Actions
I feel this is pretty tricky to declare a variable unused in a portable way in general. Some compilers don't accept the attribute.
Note also that the variables are actually used in some builds and not used in a other builds (debug/release, Linux/Windows, etc.),
and conditions are different for different variables.