]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
The clang --analyze option is too hard (for now) (#389)
authorAnders Björklund <anders.f.bjorklund@gmail.com>
Mon, 22 Apr 2019 17:57:04 +0000 (19:57 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 22 Apr 2019 17:57:04 +0000 (19:57 +0200)
The scan-build wrapper seems to use -analyze.

src/compopt.c
unittest/test_compopt.c

index 2ead25a060fd58214fe71131d1298cc138065cd3..2106df3da1405280da6609662a039484acf877b6 100644 (file)
@@ -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},
index 94dc2dd491f1d1d1abb9c9300cfd61ae4fd31619..c9ae789b5b6b434d3a31251443644f4532e7fb3b 100644 (file)
@@ -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