-
Notifications
You must be signed in to change notification settings - Fork 16.8k
misc-include-cleaner false positive #190831
Copy link
Copy link
Open
Labels
clang-tidyconfirmedVerified by a second partyVerified by a second partyfalse-positiveWarning fires when it should notWarning fires when it should not
Description
> clang-tidy -checks='*,-llvmlibc-restrict-system-libc-headers,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-altera-unroll-loops,-concurrency-mt-unsafe,-altera-id-dependent-backward-branch,-readability-function-cognitive-complexity,-*-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables' vector.c
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "vector.c"
No compilation database found in /u/talib or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
3771 warnings generated.
/u/talib/vector.c:7:1: warning: included header getopt.h is not used directly [misc-include-cleaner]
7 | #include <getopt.h>
| ^~~~~~~~~~~~~~~~~~~
8 | #include <libgen.h>
/u/talib/vector.c:56:23: warning: no header providing "getopt" is directly included [misc-include-cleaner]
4 | while ((opt = getopt(argc, argv, OPTIONS)) != -1) {
| ^
/u/talib/vector.c:59:35: warning: no header providing "optarg" is directly included [misc-include-cleaner]
59 | ifile = fopen(optarg, "re");
| ^
Suppressed 3768 warnings (3768 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
clang-tidyconfirmedVerified by a second partyVerified by a second partyfalse-positiveWarning fires when it should notWarning fires when it should not
Type
Fields
Give feedbackNo fields configured for issues without a type.