diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-08-30 05:49:16 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-08-30 05:49:16 +0000 |
commit | 318cc3c07eaca04d319be841e9e3bac35d1ff9f5 (patch) | |
tree | 0b03de4090577163ae21d4d481469895499cc091 | |
parent | 50f88b99c60c2ed31b339cd8bd484766cc9e916b (diff) |
Change -analyzer-config to use '=' as the key-value separator, and only
support the '-analyzer-config key=val' variant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162891 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticDriverKinds.td | 2 | ||||
-rw-r--r-- | include/clang/Driver/CC1Options.td | 4 | ||||
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index 724a9a813b..e0a89a1cc3 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -145,5 +145,5 @@ def note_drv_command_failed_diag_msg : Note< def err_analyzer_config_no_value : Error< "analyzer-config option '%0' has a key but no value">; def err_analyzer_config_multiple_values : Error< - "analyzer-config option '%0' should contain only one ':'">; + "analyzer-config option '%0' should contain only one '='">; } diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 9213d217ef..53bbfa4ed2 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -120,9 +120,7 @@ def analyzer_checker_help : Flag<"-analyzer-checker-help">, HelpText<"Display the list of analyzer checkers that are available">; def analyzer_config : Separate<"-analyzer-config">, - HelpText<"Choose analyzer checkers to enable">; -def analyzer_config_EQ : Joined<"-analyzer-config=">, - Alias<analyzer_config>; + HelpText<"Choose analyzer options to enable">; //===----------------------------------------------------------------------===// // Migrator Options diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 8935e775a7..6f6ef42c6f 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1161,20 +1161,20 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, const Arg *A = *it; A->claim(); // We can have a list of comma separated config names, e.g: - // '-analyzer-config=key1:val1,key2:val2' + // '-analyzer-config key1=val1,key2=val2' StringRef configList = A->getValue(Args); SmallVector<StringRef, 4> configVals; configList.split(configVals, ","); for (unsigned i = 0, e = configVals.size(); i != e; ++i) { StringRef key, val; - llvm::tie(key, val) = configVals[i].split(":"); + llvm::tie(key, val) = configVals[i].split("="); if (val.empty()) { Diags.Report(SourceLocation(), diag::err_analyzer_config_no_value) << configVals[i]; Success = false; break; } - if (val.find(':') != StringRef::npos) { + if (val.find('=') != StringRef::npos) { Diags.Report(SourceLocation(), diag::err_analyzer_config_multiple_values) << configVals[i]; |