summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-11-09 16:28:11 +0000
committerAlexander Kornienko <alexfh@google.com>2015-11-09 16:28:11 +0000
commit64956b5e9afb2badbd91354aefba7bfdbd1652d4 (patch)
treea70d2ad42d321410c37a83d187269a36df33beba /clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
parent7dee82e729a166c302cab7db1bcfbd91844f664f (diff)
downloadbcm5719-llvm-64956b5e9afb2badbd91354aefba7bfdbd1652d4.tar.gz
bcm5719-llvm-64956b5e9afb2badbd91354aefba7bfdbd1652d4.zip
Add ExtraArgs and ExtraArgsBefore options to enable clang warnings via configuration files.
Summary: This patch depends on http://reviews.llvm.org/D14191 Reviewers: djasper, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14192 llvm-svn: 252485
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidyOptions.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyOptions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
index 15ca2155399..6baca370e87 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
@@ -27,6 +27,7 @@ using clang::tidy::FileFilter;
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(FileFilter)
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(FileFilter::LineRange)
LLVM_YAML_IS_SEQUENCE_VECTOR(ClangTidyOptions::StringPair)
+LLVM_YAML_IS_SEQUENCE_VECTOR(std::string)
namespace llvm {
namespace yaml {
@@ -88,6 +89,8 @@ template <> struct MappingTraits<ClangTidyOptions> {
IO.mapOptional("AnalyzeTemporaryDtors", Options.AnalyzeTemporaryDtors);
IO.mapOptional("User", Options.User);
IO.mapOptional("CheckOptions", NOpts->Options);
+ IO.mapOptional("ExtraArgs", Options.ExtraArgs);
+ IO.mapOptional("ExtraArgsBefore", Options.ExtraArgsBefore);
}
};
@@ -129,6 +132,10 @@ ClangTidyOptions::mergeWith(const ClangTidyOptions &Other) const {
Result.AnalyzeTemporaryDtors = Other.AnalyzeTemporaryDtors;
if (Other.User)
Result.User = Other.User;
+ if (Other.ExtraArgs)
+ Result.ExtraArgs = Other.ExtraArgs;
+ if (Other.ExtraArgsBefore)
+ Result.ExtraArgsBefore = Other.ExtraArgsBefore;
for (const auto &KeyValue : Other.CheckOptions)
Result.CheckOptions[KeyValue.first] = KeyValue.second;
OpenPOWER on IntegriCloud