clang-tidy misc-include-cleaner bug
Open
clang-include-cleaner
false-positive
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Only happens when the macro is named 'I'. If it's renamed to 'H' it's fine.
```sh
$ clang-tidy -checks='-*,misc-include-cleaner' /tmp/prova.c --
1 warning generated.
/tmp/prova.c:3:16: warning: no header providing "I" is directly included [misc-include-cleaner]
1 | #define I 42
2 |
3 | void f(void) { I; }
| ^
$ clang-tidy --version
Debian LLVM version 20.1.8
Optimized build.
```
[prova.c](https://github.com/user-attachments/files/24230466/prova.c)
Contributor guide
Assessment
This issue has not been assessed yet.