Issue |
134818
|
Summary |
[clang-tidy] misc-include-cleaner does not handle error codes in <errno.h>
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
abdelmaged
|
Source C File:
```c
#include <errno.h>
#include <stdio.h>
static void testErrno(void) {
if (errno == EEXIST) {
puts("Already Exists!");
}
}
```
Using clang-tidy misc-include-cleaner:
```
[source>:5:16: warning: no header providing "EEXIST" is directly included [misc-include-cleaner]](_javascript_:;)
1 | #include <errno.h>
2 | #include <stdio.h>
3 |
4 | static void testErrno(void) {
5 | if (errno == EEXIST) {
| ^
1 warning generated.
```
Issue also reproducible in this link:
https://godbolt.org/z/xMo84z8oz
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs