Issue |
134557
|
Summary |
clang-tidy misc-include-cleaner should not mark standard headers
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
H-Wadman
|
Note: I am currently on using clang-tidy provided with the llvm 20.1.2 package from homebrew.
I am currently using clang-tidy with the misc-include-cleaner to, well, keep my includes clean. However I keep getting warnings on standard headers, that in my opinion should not be marked. See for example this case:
<img width="1058" alt="Image" src="" />
This file is including string.h, which is standardised to have NULL defined (see [cppreference](https://en.cppreference.com/w/c/header/string)), but on my current platform (MacOS Sonoma 14.0), the standard library headers define NULL via transitive includes. In fact when I checked the cstring header provided via my llvm 20.1.2 libc++ it also does not define NULL directly. It would be nice (if considered feasible) to take C/C++ standards into account when considering missing includes in order to minimise changes with the sole purpose of satisfying the linter, without improvement to code quality.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs