Issue |
134535
|
Summary |
[clang-tidy] misc-include-cleaner false positive for FILE type header in C89 & C90
|
Labels |
clang-tidy,
false-positive
|
Assignees |
|
Reporter |
abdelmaged
|
Source C file:
```
#include <stdio.h>
void testFileType(FILE *fp) {
}
```
Using clang-tidy misc-include-cleaner:
```
$ clang-tidy mytest.c -checks=-*,misc-include-cleaner -- -std=c89
2 warnings generated.
mytest.c:1:1: warning: included header stdio.h is not used directly [misc-include-cleaner]
1 | #include <stdio.h>
| ^~~~~~~~~~~~~~~~~~
2 |
mytest.c:3:19: warning: no header providing "FILE" is directly included [misc-include-cleaner]
1 | #include <stdio.h>
2 |
3 | void testFileType(FILE *fp) {
| ^
```
Issue also reproducible in this link:
https://godbolt.org/z/3aWYjhjdb
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs