[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 23 08:19:07 PST 2025
https://github.com/PiotrZSL commented:
1. Wrong category, maybe better would be 'portability'
2. To short check name, maybe better would be portability-undefined-bool-literal or something similar.
3. What about 'false' ?
4. This issue is detected by -Wundef compiler warning in both clang and gcc.
Consider:
1. Not adding check if -Wundef is sufficient
2. Create check that forbids usage of true/false in processor as an non-portable thing (could be in portability category)
3. Extracting 'true' case from -Wundef into separate warning like -Wundef-true
https://github.com/llvm/llvm-project/pull/128265
More information about the cfe-commits
mailing list