From: Anders Björklund Date: Mon, 22 Apr 2019 17:57:04 +0000 (+0200) Subject: The clang --analyze option is too hard (for now) (#389) X-Git-Tag: v3.7~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3873f1eff3208b3bad2b36e7f5ebfbc192f7144;p=thirdparty%2Fccache.git The clang --analyze option is too hard (for now) (#389) The scan-build wrapper seems to use -analyze. --- diff --git a/src/compopt.c b/src/compopt.c index 2ead25a06..2106df3da 100644 --- a/src/compopt.c +++ b/src/compopt.c @@ -30,6 +30,7 @@ struct compopt { }; static const struct compopt compopts[] = { + {"--analyze", TOO_HARD}, // clang {"--compiler-bindir", AFFECTS_CPP | TAKES_ARG}, // nvcc {"--libdevice-directory", AFFECTS_CPP | TAKES_ARG}, // nvcc {"--output-directory", AFFECTS_CPP | TAKES_ARG}, // nvcc @@ -59,6 +60,7 @@ static const struct compopt compopts[] = { {"-Xclang", TAKES_ARG}, {"-Xlinker", TAKES_ARG}, {"-Xpreprocessor", AFFECTS_CPP | TOO_HARD_DIRECT | TAKES_ARG}, + {"-analyze", TOO_HARD}, // clang {"-arch", TAKES_ARG}, {"-aux-info", TAKES_ARG}, {"-b", TAKES_ARG}, diff --git a/unittest/test_compopt.c b/unittest/test_compopt.c index 94dc2dd49..c9ae789b5 100644 --- a/unittest/test_compopt.c +++ b/unittest/test_compopt.c @@ -125,4 +125,14 @@ TEST(dash_iframework_prefix_affects_cpp) CHECK(compopt_prefix_affects_cpp("-iframework")); } +TEST(dash_analyze_too_hard) +{ + CHECK(compopt_too_hard("-analyze")); +} + +TEST(dash_dash_analyze_too_hard) +{ + CHECK(compopt_too_hard("--analyze")); +} + TEST_SUITE_END