From: Rui Ueyama Date: Wed, 23 Aug 2017 14:48:58 +0000 (+0000) Subject: Revert r311552: [Bash-autocompletion] Add support for static analyzer flags X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fe799373a8151095a8665ac6e6f4ed0b6f59538;p=clang Revert r311552: [Bash-autocompletion] Add support for static analyzer flags This reverts commit r311552 because it broke ubsan and asan bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311557 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 74e4fb60ee..c53d7a9136 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -99,19 +99,7 @@ def analyzer_stats : Flag<["-"], "analyzer-stats">, HelpText<"Print internal analyzer statistics.">; def analyzer_checker : Separate<["-"], "analyzer-checker">, - HelpText<"Choose analyzer checkers to enable">, - ValuesCode<[{ - const char *Values = - #define GET_CHECKERS - #define CHECKER(FULLNAME, CLASS, DESCFILE, HT, G, H) FULLNAME "," - #include "clang/StaticAnalyzer/Checkers/Checkers.inc" - #undef GET_CHECKERS - #define GET_PACKAGES - #define PACKAGE(FULLNAME, G, D) FULLNAME "," - #include "clang/StaticAnalyzer/Checkers/Checkers.inc" - #undef GET_PACKAGES - ; - }]>; + HelpText<"Choose analyzer checkers to enable">; def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">, Alias; diff --git a/lib/Driver/DriverOptions.cpp b/lib/Driver/DriverOptions.cpp index 11e7e4c8fe..ac63b96cf9 100644 --- a/lib/Driver/DriverOptions.cpp +++ b/lib/Driver/DriverOptions.cpp @@ -11,7 +11,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Option/OptTable.h" #include "llvm/Option/Option.h" -#include using namespace clang::driver; using namespace clang::driver::options; @@ -41,13 +40,5 @@ public: } std::unique_ptr clang::driver::createDriverOptTable() { - auto Result = llvm::make_unique(); - // Options.inc is included in DriverOptions.cpp, and calls OptTable's - // addValues function. - // Opt is a variable used in the code fragment in Options.inc. - OptTable &Opt = *Result; -#define OPTTABLE_ARG_INIT -#include "clang/Driver/Options.inc" -#undef OPTTABLE_ARG_INIT - return std::move(Result); + return llvm::make_unique(); } diff --git a/test/Driver/autocomplete.c b/test/Driver/autocomplete.c index 06e700f1ac..5680801a64 100644 --- a/test/Driver/autocomplete.c +++ b/test/Driver/autocomplete.c @@ -93,5 +93,3 @@ // WARNING-NEXT: -Wmax-unsigned-zero // RUN: %clang --autocomplete=-Wno-invalid-pp- | FileCheck %s -check-prefix=NOWARNING // NOWARNING: -Wno-invalid-pp-token -// RUN: %clang --autocomplete=-analyzer-checker, | FileCheck %s -check-prefix=ANALYZER -// ANALYZER: unix.Malloc