Open
Description
Source C File:
#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]
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
clang-tidy version: 20.1.1
This warning was not produced in 18.1.6