This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via 05d5c66ff853f88e6dbe43bbddd18dd8babaa427 (commit) via 1c2c541b0c2e1224c00cf4648f4b7ba7f1d19ec3 (commit) via b31aa0285c586298e253b5f94490bca58dcce5a2 (commit) via 8588cdf3a021941ad15e3b289737bc9f1ecec84a (commit) via f1f57cffc73cbb518d9559308f3d36a655e5738d (commit) via 175d8c4bf6505eeb02bb588527f3ff7b5eb143b9 (commit) via 7c5ec91301f31e7caff6524ab83b5bb5c614d5d7 (commit) via d63c1e4e6e8507cb1c8425d521cf61fa4adbf4a8 (commit) via 2528b70293724b401bc1927f90f2ef91a3f3d499 (commit) from c2ead49451cdd29da50954c88d45334694026ad0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05d5c66ff853f88e6dbe43bbddd18dd8babaa427 commit 05d5c66ff853f88e6dbe43bbddd18dd8babaa427 Merge: 1c2c541 d63c1e4 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Sep 10 14:25:40 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Sep 10 10:27:44 2019 -0400 Merge topic 'tidy-return-brace' d63c1e4e6e clang-tidy: modernize-return-braced-init-list Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3790 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c2c541b0c2e1224c00cf4648f4b7ba7f1d19ec3 commit 1c2c541b0c2e1224c00cf4648f4b7ba7f1d19ec3 Merge: b31aa02 8588cdf Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Sep 10 14:25:57 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Sep 10 10:26:55 2019 -0400 Merge topic 'clang-tidy-8-macOS' 8588cdf3a0 clang-tidy: Fix bugprone-exception-escape diagnostic in test code f1f57cffc7 clang-tidy: Fix performance-for-range-copy diagnostic in Xcode generator 175d8c4bf6 clang-tidy: Resolve performance-unnecessary-value-param diagnostics 7c5ec91301 cmGeneratedFileStreamBase: Optimize string construction in Close Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3796 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b31aa0285c586298e253b5f94490bca58dcce5a2 commit b31aa0285c586298e253b5f94490bca58dcce5a2 Merge: c2ead49 2528b70 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Sep 10 14:25:27 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Sep 10 10:25:40 2019 -0400 Merge topic 'clang-tidy-8' 2528b70293 clang-tidy: Remove old entries from blacklist Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3787 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8588cdf3a021941ad15e3b289737bc9f1ecec84a commit 8588cdf3a021941ad15e3b289737bc9f1ecec84a Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 9 13:49:03 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 9 13:51:23 2019 -0400 clang-tidy: Fix bugprone-exception-escape diagnostic in test code diff --git a/Tests/CMakeLib/testUVProcessChainHelper.cxx b/Tests/CMakeLib/testUVProcessChainHelper.cxx index 263665d..a77ec90 100644 --- a/Tests/CMakeLib/testUVProcessChainHelper.cxx +++ b/Tests/CMakeLib/testUVProcessChainHelper.cxx @@ -44,7 +44,7 @@ int main(int argc, char** argv) } if (command == "dedup") { // Use a nested scope to free all resources before aborting below. - { + try { std::string input = getStdin(); std::set<char> seen; std::string output; @@ -56,6 +56,7 @@ int main(int argc, char** argv) } std::cout << output << std::flush; std::cerr << "3" << std::flush; + } catch (...) { } // On Windows, the exit code of abort() is different between debug and https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1f57cffc73cbb518d9559308f3d36a655e5738d commit f1f57cffc73cbb518d9559308f3d36a655e5738d Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 9 13:40:08 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 9 13:51:23 2019 -0400 clang-tidy: Fix performance-for-range-copy diagnostic in Xcode generator Fix diagnostics that appear on macOS with clang-tidy-8. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 502a642..3dae824 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1254,7 +1254,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget( bundleFiles[tsFlags.MacFolder].push_back(sourceFile); } } - for (auto keySources : bundleFiles) { + for (auto const& keySources : bundleFiles) { cmXCodeObject* copyFilesBuildPhase = this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase); copyFilesBuildPhase->SetComment("Copy files"); @@ -1302,7 +1302,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget( bundleFiles[tsFlags.MacFolder].push_back(sourceFile); } } - for (auto keySources : bundleFiles) { + for (auto const& keySources : bundleFiles) { cmXCodeObject* copyFilesBuildPhase = this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase); copyFilesBuildPhase->SetComment("Copy files"); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=175d8c4bf6505eeb02bb588527f3ff7b5eb143b9 commit 175d8c4bf6505eeb02bb588527f3ff7b5eb143b9 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 9 13:38:01 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 9 13:51:23 2019 -0400 clang-tidy: Resolve performance-unnecessary-value-param diagnostics Fix diagnostics that appear on macOS with clang-tidy-8. Suppress cases where we intentionally take an argument by value to let the caller choose whether to copy or move. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 10f822f..502a642 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1433,7 +1433,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateBuildPhase( void cmGlobalXCodeGenerator::CreateCustomCommands( cmXCodeObject* buildPhases, cmXCodeObject* sourceBuildPhase, cmXCodeObject* headerBuildPhase, cmXCodeObject* resourceBuildPhase, - std::vector<cmXCodeObject*> contentBuildPhases, + std::vector<cmXCodeObject*> const& contentBuildPhases, cmXCodeObject* frameworkBuildPhase, cmGeneratorTarget* gtgt) { std::vector<cmCustomCommand> const& prebuild = gtgt->GetPreBuildCommands(); diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 71446f9..af905d0 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -122,13 +122,11 @@ private: std::string RelativeToSource(const std::string& p); std::string RelativeToBinary(const std::string& p); std::string ConvertToRelativeForMake(std::string const& p); - void CreateCustomCommands(cmXCodeObject* buildPhases, - cmXCodeObject* sourceBuildPhase, - cmXCodeObject* headerBuildPhase, - cmXCodeObject* resourceBuildPhase, - std::vector<cmXCodeObject*> contentBuildPhases, - cmXCodeObject* frameworkBuildPhase, - cmGeneratorTarget* gtgt); + void CreateCustomCommands( + cmXCodeObject* buildPhases, cmXCodeObject* sourceBuildPhase, + cmXCodeObject* headerBuildPhase, cmXCodeObject* resourceBuildPhase, + std::vector<cmXCodeObject*> const& contentBuildPhases, + cmXCodeObject* frameworkBuildPhase, cmGeneratorTarget* gtgt); std::string ComputeInfoPListLocation(cmGeneratorTarget* target); diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index ff3ecd9..349d5e9 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -326,6 +326,7 @@ cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& snapshot) { } +/* NOLINTNEXTLINE(performance-unnecessary-value-param) */ cmListFileBacktrace::cmListFileBacktrace(std::shared_ptr<Entry const> parent, cmListFileContext const& lfc) : TopEntry(std::make_shared<Entry const>(std::move(parent), lfc)) diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index db23efd..f9f7d66 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -91,6 +91,7 @@ static void deleteVariableWatchCallbackData(void* client_data) class FinalAction { public: + /* NOLINTNEXTLINE(performance-unnecessary-value-param) */ FinalAction(cmMakefile* makefile, std::string variable) : Action(std::make_shared<Impl>(makefile, std::move(variable))) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c5ec91301f31e7caff6524ab83b5bb5c614d5d7 commit 7c5ec91301f31e7caff6524ab83b5bb5c614d5d7 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Sep 9 13:50:12 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Sep 9 13:51:23 2019 -0400 cmGeneratedFileStreamBase: Optimize string construction in Close Use cmStrCat to concatenate two parts of a file name. This also avoids a bugprone-exception-escape diagnostic from clang-tidy-8 on macOS. diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 7475e9f..491d96f 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -4,6 +4,7 @@ #include <stdio.h> +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #if !defined(CMAKE_BOOTSTRAP) @@ -149,7 +150,7 @@ bool cmGeneratedFileStreamBase::Close() // The destination is to be replaced. Rename the temporary to the // destination atomically. if (this->Compress) { - std::string gzname = this->TempName + ".temp.gz"; + std::string gzname = cmStrCat(this->TempName, ".temp.gz"); if (this->CompressFile(this->TempName, gzname)) { this->RenameFile(gzname, resname); } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d63c1e4e6e8507cb1c8425d521cf61fa4adbf4a8 commit d63c1e4e6e8507cb1c8425d521cf61fa4adbf4a8 Author: Regina Pfeifer <reg...@mailbox.org> AuthorDate: Fri Sep 6 22:27:39 2019 +0200 Commit: Regina Pfeifer <reg...@mailbox.org> CommitDate: Fri Sep 6 22:27:39 2019 +0200 clang-tidy: modernize-return-braced-init-list diff --git a/.clang-tidy b/.clang-tidy index cfca64e..2d17145 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -15,7 +15,6 @@ misc-*,\ modernize-*,\ -modernize-avoid-c-arrays,\ -modernize-deprecated-headers,\ --modernize-return-braced-init-list,\ -modernize-use-auto,\ -modernize-use-nodiscard,\ -modernize-use-noexcept,\ diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index cf28cdb..4c8c224 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -498,7 +498,7 @@ cmCacheManager::CacheEntry* cmCacheManager::GetCacheEntry( cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(const char* key) { - return CacheIterator(*this, key); + return { *this, key }; } const std::string* cmCacheManager::GetInitializedCacheValue( diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index a988bd8..faa60c5 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -94,7 +94,7 @@ public: }; //! return an iterator to iterate through the cache map - cmCacheManager::CacheIterator NewIterator() { return CacheIterator(*this); } + cmCacheManager::CacheIterator NewIterator() { return { *this }; } //! Load a cache for given makefile. Loads from path/CMakeCache.txt. bool LoadCache(const std::string& path, bool internal, diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 9f0396b..e9d2412 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -311,7 +311,7 @@ cmExportBuildFileGenerator::FindBuildExportInfo(cmGlobalGenerator* gg, } } - return std::make_pair(exportFiles, ns); + return { exportFiles, ns }; } void cmExportBuildFileGenerator::ComplainAboutMissingTarget( diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index e7f301e..4e3db09 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -496,7 +496,7 @@ cmExportInstallFileGenerator::FindNamespaces(cmGlobalGenerator* gg, } } - return std::make_pair(exportFiles, ns); + return { exportFiles, ns }; } void cmExportInstallFileGenerator::ComplainAboutMissingTarget( diff --git a/Source/cmFileLockResult.cxx b/Source/cmFileLockResult.cxx index 9ca5d8a..c4779f0 100644 --- a/Source/cmFileLockResult.cxx +++ b/Source/cmFileLockResult.cxx @@ -8,7 +8,7 @@ #define WINMSG_BUF_LEN (1024) cmFileLockResult cmFileLockResult::MakeOk() { - return cmFileLockResult(OK, 0); + return { OK, 0 }; } cmFileLockResult cmFileLockResult::MakeSystem() @@ -18,27 +18,27 @@ cmFileLockResult cmFileLockResult::MakeSystem() #else const Error lastError = errno; #endif - return cmFileLockResult(SYSTEM, lastError); + return { SYSTEM, lastError }; } cmFileLockResult cmFileLockResult::MakeTimeout() { - return cmFileLockResult(TIMEOUT, 0); + return { TIMEOUT, 0 }; } cmFileLockResult cmFileLockResult::MakeAlreadyLocked() { - return cmFileLockResult(ALREADY_LOCKED, 0); + return { ALREADY_LOCKED, 0 }; } cmFileLockResult cmFileLockResult::MakeInternal() { - return cmFileLockResult(INTERNAL, 0); + return { INTERNAL, 0 }; } cmFileLockResult cmFileLockResult::MakeNoFunction() { - return cmFileLockResult(NO_FUNCTION, 0); + return { NO_FUNCTION, 0 }; } bool cmFileLockResult::IsOk() const diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b4706a3..fc7589e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4778,21 +4778,21 @@ template <> std::pair<bool, bool> consistentProperty(bool lhs, bool rhs, CompatibleType /*unused*/) { - return std::make_pair(lhs == rhs, lhs); + return { lhs == rhs, lhs }; } std::pair<bool, const char*> consistentStringProperty(const char* lhs, const char* rhs) { const bool b = strcmp(lhs, rhs) == 0; - return std::make_pair(b, b ? lhs : nullptr); + return { b, b ? lhs : nullptr }; } std::pair<bool, std::string> consistentStringProperty(const std::string& lhs, const std::string& rhs) { const bool b = lhs == rhs; - return std::make_pair(b, b ? lhs : valueAsString(nullptr)); + return { b, b ? lhs : valueAsString(nullptr) }; } std::pair<bool, const char*> consistentNumberProperty(const char* lhs, @@ -4801,22 +4801,21 @@ std::pair<bool, const char*> consistentNumberProperty(const char* lhs, { char* pEnd; - const char* const null_ptr = nullptr; - long lnum = strtol(lhs, &pEnd, 0); if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE) { - return std::pair<bool, const char*>(false, null_ptr); + return { false, nullptr }; } long rnum = strtol(rhs, &pEnd, 0); if (pEnd == rhs || *pEnd != '\0' || errno == ERANGE) { - return std::pair<bool, const char*>(false, null_ptr); + return { false, nullptr }; } if (t == NumberMaxType) { - return std::make_pair(true, std::max(lnum, rnum) == lnum ? lhs : rhs); + return { true, std::max(lnum, rnum) == lnum ? lhs : rhs }; } - return std::make_pair(true, std::min(lnum, rnum) == lnum ? lhs : rhs); + + return { true, std::min(lnum, rnum) == lnum ? lhs : rhs }; } template <> @@ -4825,21 +4824,19 @@ std::pair<bool, const char*> consistentProperty(const char* lhs, CompatibleType t) { if (!lhs && !rhs) { - return std::make_pair(true, lhs); + return { true, lhs }; } if (!lhs) { - return std::make_pair(true, rhs); + return { true, rhs }; } if (!rhs) { - return std::make_pair(true, lhs); + return { true, lhs }; } - const char* const null_ptr = nullptr; - switch (t) { case BoolType: { bool same = cmIsOn(lhs) == cmIsOn(rhs); - return std::make_pair(same, same ? lhs : nullptr); + return { same, same ? lhs : nullptr }; } case StringType: return consistentStringProperty(lhs, rhs); @@ -4848,7 +4845,7 @@ std::pair<bool, const char*> consistentProperty(const char* lhs, return consistentNumberProperty(lhs, rhs, t); } assert(false && "Unreachable!"); - return std::pair<bool, const char*>(false, null_ptr); + return { false, nullptr }; } std::pair<bool, std::string> consistentProperty(const std::string& lhs, @@ -4858,31 +4855,31 @@ std::pair<bool, std::string> consistentProperty(const std::string& lhs, const std::string null_ptr = valueAsString(nullptr); if (lhs == null_ptr && rhs == null_ptr) { - return std::make_pair(true, lhs); + return { true, lhs }; } if (lhs == null_ptr) { - return std::make_pair(true, rhs); + return { true, rhs }; } if (rhs == null_ptr) { - return std::make_pair(true, lhs); + return { true, lhs }; } switch (t) { case BoolType: { bool same = cmIsOn(lhs) == cmIsOn(rhs); - return std::make_pair(same, same ? lhs : null_ptr); + return { same, same ? lhs : null_ptr }; } case StringType: return consistentStringProperty(lhs, rhs); case NumberMinType: case NumberMaxType: { auto value = consistentNumberProperty(lhs.c_str(), rhs.c_str(), t); - return std::make_pair( - value.first, value.first ? std::string(value.second) : null_ptr); + return { value.first, + value.first ? std::string(value.second) : null_ptr }; } } assert(false && "Unreachable!"); - return std::pair<bool, std::string>(false, null_ptr); + return { false, null_ptr }; } template <typename PropertyType> diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index f6d5998..7aa231e 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -228,7 +228,7 @@ public: return this->GG->ConvertToNinjaPath(path); } }; - MapToNinjaPathImpl MapToNinjaPath() { return MapToNinjaPathImpl(this); } + MapToNinjaPathImpl MapToNinjaPath() { return { this }; } // -- Additional clean files void AddAdditionalCleanFile(std::string fileName); diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h index eee331f..c8bb1ab 100644 --- a/Source/cmScriptGenerator.h +++ b/Source/cmScriptGenerator.h @@ -25,7 +25,7 @@ public: } cmScriptGeneratorIndent Next(int step = 2) const { - return cmScriptGeneratorIndent(this->Level + step); + return { this->Level + step }; } private: diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 670161d..d576f36 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -167,7 +167,7 @@ bool cmServerProtocol::DoActivate(const cmServerRequest& /*request*/, std::pair<int, int> cmServerProtocol1::ProtocolVersion() const { - return std::make_pair(1, 2); + return { 1, 2 }; } static void setErrorMessage(std::string* errorMessage, const std::string& text) diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 902287c..92d17ab 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -324,7 +324,7 @@ cmStateSnapshot cmState::Reset() this->DefineProperty("RULE_LAUNCH_LINK", cmProperty::TARGET, "", "", true); this->DefineProperty("RULE_LAUNCH_CUSTOM", cmProperty::TARGET, "", "", true); - return cmStateSnapshot(this, pos); + return { this, pos }; } void cmState::DefineProperty(const std::string& name, @@ -789,7 +789,7 @@ cmStateSnapshot cmState::CreateBaseSnapshot() assert(pos->Vars.IsValid()); pos->Parent = this->VarTree.Root(); pos->Root = this->VarTree.Root(); - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot( @@ -842,7 +842,7 @@ cmStateSnapshot cmState::CreateFunctionCallSnapshot( cmLinkedTree<cmDefinitions>::iterator origin = originSnapshot.Position->Vars; pos->Parent = origin; pos->Vars = this->VarTree.Push(origin); - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::CreateMacroCallSnapshot( @@ -857,7 +857,7 @@ cmStateSnapshot cmState::CreateMacroCallSnapshot( assert(originSnapshot.Position->Vars.IsValid()); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::CreateIncludeFileSnapshot( @@ -872,7 +872,7 @@ cmStateSnapshot cmState::CreateIncludeFileSnapshot( assert(originSnapshot.Position->Vars.IsValid()); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::CreateVariableScopeSnapshot( @@ -890,7 +890,7 @@ cmStateSnapshot cmState::CreateVariableScopeSnapshot( pos->Parent = origin; pos->Vars = this->VarTree.Push(origin); assert(pos->Vars.IsValid()); - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::CreateInlineListFileSnapshot( @@ -904,7 +904,7 @@ cmStateSnapshot cmState::CreateInlineListFileSnapshot( originSnapshot.Position->ExecutionListFile, fileName); pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::CreatePolicyScopeSnapshot( @@ -916,7 +916,7 @@ cmStateSnapshot cmState::CreatePolicyScopeSnapshot( pos->Keep = false; pos->BuildSystemDirectory->DirectoryEnd = pos; pos->PolicyScope = originSnapshot.Position->Policies; - return cmStateSnapshot(this, pos); + return { this, pos }; } cmStateSnapshot cmState::Pop(cmStateSnapshot const& originSnapshot) @@ -948,7 +948,7 @@ cmStateSnapshot cmState::Pop(cmStateSnapshot const& originSnapshot) this->SnapshotData.Pop(pos); } - return cmStateSnapshot(this, prevPos); + return { this, prevPos }; } static bool ParseEntryWithoutType(const std::string& entry, std::string& var, diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index 121923d..3c54f52 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -66,8 +66,7 @@ bool cmStateSnapshot::IsValid() const cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectory() const { - return cmStateSnapshot(this->State, - this->Position->BuildSystemDirectory->DirectoryEnd); + return { this->State, this->Position->BuildSystemDirectory->DirectoryEnd }; } cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const @@ -126,7 +125,7 @@ cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const pos != this->State->SnapshotData.Root()) { ++pos; } - return cmStateSnapshot(this->State, pos); + return { this->State, pos }; } void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap const& entry, bool weak) @@ -426,7 +425,7 @@ cmState* cmStateSnapshot::GetState() const cmStateDirectory cmStateSnapshot::GetDirectory() const { - return cmStateDirectory(this->Position->BuildSystemDirectory, *this); + return { this->Position->BuildSystemDirectory, *this }; } void cmStateSnapshot::SetProjectName(const std::string& name) diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h index a5b06af..c4103cc 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -77,14 +77,11 @@ private: void CloseStartElement(); private: - static cmXMLSafe SafeAttribute(const char* value) - { - return cmXMLSafe(value); - } + static cmXMLSafe SafeAttribute(const char* value) { return { value }; } static cmXMLSafe SafeAttribute(std::string const& value) { - return cmXMLSafe(value); + return { value }; } template <typename T> diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ace9198..e7c714e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1081,20 +1081,18 @@ createExtraGenerator( const std::vector<std::string> generators = i->GetSupportedGlobalGenerators(); if (i->GetName() == name) { // Match aliases - return std::make_pair(i->CreateExternalMakefileProjectGenerator(), - generators.at(0)); + return { i->CreateExternalMakefileProjectGenerator(), generators.at(0) }; } for (std::string const& g : generators) { const std::string fullName = cmExternalMakefileProjectGenerator::CreateFullGeneratorName( g, i->GetName()); if (fullName == name) { - return std::make_pair(i->CreateExternalMakefileProjectGenerator(), g); + return { i->CreateExternalMakefileProjectGenerator(), g }; } } } - return std::make_pair( - static_cast<cmExternalMakefileProjectGenerator*>(nullptr), name); + return { nullptr, name }; } cmGlobalGenerator* cmake::CreateGlobalGenerator(const std::string& gname) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2528b70293724b401bc1927f90f2ef91a3f3d499 commit 2528b70293724b401bc1927f90f2ef91a3f3d499 Author: Regina Pfeifer <reg...@mailbox.org> AuthorDate: Thu Sep 5 17:58:58 2019 +0200 Commit: Regina Pfeifer <reg...@mailbox.org> CommitDate: Fri Sep 6 21:24:18 2019 +0200 clang-tidy: Remove old entries from blacklist Now that clang-tidy-8 is used, we can remove the checks that have been renamed. Also enable a return-braced-init-list, because we don't have any violations for that one. diff --git a/.clang-tidy b/.clang-tidy index cfca64e..32ee0a9 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -7,9 +7,6 @@ bugprone-*,\ -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-*,\ @@ -24,7 +21,6 @@ performance-*,\ readability-*,\ -readability-function-size,\ -readability-identifier-naming,\ --readability-implicit-bool-cast,\ -readability-implicit-bool-conversion,\ -readability-inconsistent-declaration-parameter-name,\ -readability-magic-numbers,\ ----------------------------------------------------------------------- Summary of changes: .clang-tidy | 5 ---- Source/cmCacheManager.cxx | 2 +- Source/cmCacheManager.h | 2 +- Source/cmExportBuildFileGenerator.cxx | 2 +- Source/cmExportInstallFileGenerator.cxx | 2 +- Source/cmFileLockResult.cxx | 12 ++++---- Source/cmGeneratedFileStream.cxx | 3 +- Source/cmGeneratorTarget.cxx | 43 ++++++++++++++--------------- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 6 ++-- Source/cmGlobalXCodeGenerator.h | 12 ++++---- Source/cmListFileCache.cxx | 1 + Source/cmScriptGenerator.h | 2 +- Source/cmServerProtocol.cxx | 2 +- Source/cmState.cxx | 18 ++++++------ Source/cmStateSnapshot.cxx | 7 ++--- Source/cmVariableWatchCommand.cxx | 1 + Source/cmXMLWriter.h | 7 ++--- Source/cmake.cxx | 8 ++---- Tests/CMakeLib/testUVProcessChainHelper.cxx | 3 +- 20 files changed, 64 insertions(+), 76 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits