From b3873f1eff3208b3bad2b36e7f5ebfbc192f7144 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20Bj=C3=B6rklund?= Date: Mon, 22 Apr 2019 19:57:04 +0200 Subject: [PATCH] The clang --analyze option is too hard (for now) (#389) The scan-build wrapper seems to use -analyze. --- src/compopt.c | 2 ++ unittest/test_compopt.c | 10 ++++++++++ 2 files changed, 12 insertions(+) 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 -- 2.47.2