diff options
author | Brad King <brad.king@kitware.com> | 2019-07-31 15:47:44 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-31 15:54:28 (GMT) |
commit | 1672d3d5a5a0c5c73a857f5e4592fe998da3ae78 (patch) | |
tree | 74f82383ec21d00704e149e7e9cca418d051f484 | |
parent | 403b6b3bc387fbe5c9c058d591f478f94b40a9fd (diff) | |
parent | 4af094c8dfa8dd5bfb943a84e5f4c00f7bf2ee8f (diff) | |
download | CMake-1672d3d5a5a0c5c73a857f5e4592fe998da3ae78.zip CMake-1672d3d5a5a0c5c73a857f5e4592fe998da3ae78.tar.gz CMake-1672d3d5a5a0c5c73a857f5e4592fe998da3ae78.tar.bz2 |
Merge topic 'clang-tidy-8'
4af094c8df clang-tidy: Blacklist violations for version 8
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3627
-rw-r--r-- | .clang-tidy | 8 | ||||
-rw-r--r-- | Source/CTest/cmParseBlanketJSCoverage.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmParseBlanketJSCoverage.h | 2 | ||||
-rw-r--r-- | Source/cmFileAPI.cxx | 3 | ||||
-rw-r--r-- | Source/cmNewLineStyle.cxx | 2 | ||||
-rw-r--r-- | Source/cmNewLineStyle.h | 2 | ||||
-rw-r--r-- | Source/cmServerProtocol.cxx | 3 | ||||
-rw-r--r-- | Source/cmServerProtocol.h | 4 | ||||
-rw-r--r-- | Source/cmTargetDepend.h | 2 | ||||
-rw-r--r-- | Source/cmake.cxx | 2 |
10 files changed, 18 insertions, 13 deletions
diff --git a/.clang-tidy b/.clang-tidy index bfcb67c..57e571a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,16 +3,21 @@ Checks: "-*,\ bugprone-*,\ -bugprone-macro-parentheses,\ -bugprone-misplaced-widening-cast,\ +-bugprone-narrowing-conversions,\ +-bugprone-too-small-loop-variable,\ google-readability-casting,\ misc-*,\ -misc-incorrect-roundings,\ -misc-macro-parentheses,\ -misc-misplaced-widening-cast,\ +-misc-non-private-member-variables-in-classes,\ -misc-static-assert,\ modernize-*,\ +-modernize-avoid-c-arrays,\ -modernize-deprecated-headers,\ -modernize-return-braced-init-list,\ -modernize-use-auto,\ +-modernize-use-nodiscard,\ -modernize-use-noexcept,\ -modernize-use-transparent-functors,\ -modernize-use-using,\ @@ -24,8 +29,11 @@ readability-*,\ -readability-implicit-bool-cast,\ -readability-implicit-bool-conversion,\ -readability-inconsistent-declaration-parameter-name,\ +-readability-isolate-declaration,\ +-readability-magic-numbers,\ -readability-named-parameter,\ -readability-redundant-declaration,\ +-readability-uppercase-literal-suffix,\ " HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$' CheckOptions: diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index 63d6a15..b74decb 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -110,7 +110,8 @@ cmParseBlanketJSCoverage::cmParseBlanketJSCoverage( { } -bool cmParseBlanketJSCoverage::LoadCoverageData(std::vector<std::string> files) +bool cmParseBlanketJSCoverage::LoadCoverageData( + std::vector<std::string> const& files) { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found " << files.size() << " Files" << std::endl, diff --git a/Source/CTest/cmParseBlanketJSCoverage.h b/Source/CTest/cmParseBlanketJSCoverage.h index 696121f..cd1b225 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.h +++ b/Source/CTest/cmParseBlanketJSCoverage.h @@ -29,7 +29,7 @@ class cmParseBlanketJSCoverage public: cmParseBlanketJSCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest); - bool LoadCoverageData(std::vector<std::string> files); + bool LoadCoverageData(std::vector<std::string> const& files); // Read the JSON output bool ReadJSONFile(std::string const& file); diff --git a/Source/cmFileAPI.cxx b/Source/cmFileAPI.cxx index aa84396..2594287 100644 --- a/Source/cmFileAPI.cxx +++ b/Source/cmFileAPI.cxx @@ -684,7 +684,6 @@ void cmFileAPI::BuildClientRequestCodeModel( Json::Value cmFileAPI::BuildCodeModel(Object const& object) { - using namespace std::placeholders; Json::Value codemodel = cmFileAPICodemodelDump(*this, object.Version); codemodel["kind"] = this->ObjectKindName(object.Kind); @@ -719,7 +718,6 @@ void cmFileAPI::BuildClientRequestCache( Json::Value cmFileAPI::BuildCache(Object const& object) { - using namespace std::placeholders; Json::Value cache = cmFileAPICacheDump(*this, object.Version); cache["kind"] = this->ObjectKindName(object.Kind); @@ -754,7 +752,6 @@ void cmFileAPI::BuildClientRequestCMakeFiles( Json::Value cmFileAPI::BuildCMakeFiles(Object const& object) { - using namespace std::placeholders; Json::Value cmakeFiles = cmFileAPICMakeFilesDump(*this, object.Version); cmakeFiles["kind"] = this->ObjectKindName(object.Kind); diff --git a/Source/cmNewLineStyle.cxx b/Source/cmNewLineStyle.cxx index 3f6523e..1ff741e 100644 --- a/Source/cmNewLineStyle.cxx +++ b/Source/cmNewLineStyle.cxx @@ -41,7 +41,7 @@ bool cmNewLineStyle::ReadFromArguments(const std::vector<std::string>& args, return true; } -const std::string cmNewLineStyle::GetCharacters() const +std::string cmNewLineStyle::GetCharacters() const { switch (NewLineStyle) { case Invalid: diff --git a/Source/cmNewLineStyle.h b/Source/cmNewLineStyle.h index f1a7bc6..ab9002e 100644 --- a/Source/cmNewLineStyle.h +++ b/Source/cmNewLineStyle.h @@ -30,7 +30,7 @@ public: bool ReadFromArguments(const std::vector<std::string>& args, std::string& errorString); - const std::string GetCharacters() const; + std::string GetCharacters() const; private: Style NewLineStyle = Invalid; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index c5de742..8fcb710 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -378,8 +378,7 @@ void cmServerProtocol1::HandleCMakeFileChanges(const std::string& path, SendSignal(kFILE_CHANGE_SIGNAL, obj); } -const cmServerResponse cmServerProtocol1::Process( - const cmServerRequest& request) +cmServerResponse cmServerProtocol1::Process(const cmServerRequest& request) { assert(this->m_State >= STATE_ACTIVE); diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h index 2f55a20..5da4344 100644 --- a/Source/cmServerProtocol.h +++ b/Source/cmServerProtocol.h @@ -80,7 +80,7 @@ public: virtual std::pair<int, int> ProtocolVersion() const = 0; virtual bool IsExperimental() const = 0; - virtual const cmServerResponse Process(const cmServerRequest& request) = 0; + virtual cmServerResponse Process(const cmServerRequest& request) = 0; bool Activate(cmServer* server, const cmServerRequest& request, std::string* errorMessage); @@ -106,7 +106,7 @@ class cmServerProtocol1 : public cmServerProtocol public: std::pair<int, int> ProtocolVersion() const override; bool IsExperimental() const override; - const cmServerResponse Process(const cmServerRequest& request) override; + cmServerResponse Process(const cmServerRequest& request) override; private: bool DoActivate(const cmServerRequest& request, diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h index 5ea0085..4ca78fa 100644 --- a/Source/cmTargetDepend.h +++ b/Source/cmTargetDepend.h @@ -31,7 +31,7 @@ public: operator cmGeneratorTarget const*() const { return this->Target; } cmGeneratorTarget const* operator->() const { return this->Target; } cmGeneratorTarget const& operator*() const { return *this->Target; } - friend bool operator<(cmTargetDepend l, cmTargetDepend r) + friend bool operator<(cmTargetDepend const& l, cmTargetDepend const& r) { return l.Target < r.Target; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3b4a6c0..b97152f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -620,7 +620,7 @@ void cmake::LoadEnvironmentPresets() this->EnvironmentGenerator = envGenVar; } - auto readGeneratorVar = [&](std::string name, std::string& key) { + auto readGeneratorVar = [&](std::string const& name, std::string& key) { std::string varValue; if (cmSystemTools::GetEnv(name, varValue)) { if (hasEnvironmentGenerator) { |