From 2b4c32c95f9cd3282ee834a2d7eeba9ab56eff0b Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 25 Aug 2017 23:25:09 +0200 Subject: clang-format: format all code as Cpp11 --- .clang-format | 1 - Source/CPack/cmCPackGenerator.cxx | 5 ++-- Source/CTest/cmCTestRunTest.cxx | 6 ++-- Source/CTest/cmCTestTestHandler.cxx | 6 ++-- Source/CTest/cmCTestTestHandler.h | 6 ++-- Source/cmAlgorithms.h | 2 +- Source/cmDepends.cxx | 4 +-- Source/cmELF.h | 2 +- Source/cmExecuteProcessCommand.cxx | 2 +- Source/cmExtraCodeBlocksGenerator.cxx | 4 +-- Source/cmExtraCodeLiteGenerator.cxx | 6 ++-- Source/cmExtraEclipseCDT4Generator.cxx | 2 +- Source/cmExtraSublimeTextGenerator.cxx | 2 +- Source/cmExtraSublimeTextGenerator.h | 2 +- Source/cmFindCommon.h | 2 +- Source/cmGeneratorExpression.cxx | 2 +- Source/cmGeneratorExpression.h | 2 +- Source/cmGeneratorExpressionContext.h | 2 +- Source/cmGeneratorExpressionDAGChecker.cxx | 2 +- Source/cmGeneratorExpressionDAGChecker.h | 2 +- Source/cmGeneratorExpressionEvaluator.cxx | 10 +++---- Source/cmGeneratorExpressionEvaluator.h | 6 ++-- Source/cmGeneratorExpressionNode.cxx | 4 +-- Source/cmGeneratorExpressionParser.cxx | 2 +- Source/cmGeneratorTarget.cxx | 2 +- Source/cmGeneratorTarget.h | 2 +- Source/cmGhsMultiTargetGenerator.cxx | 4 +-- Source/cmGlobalGenerator.h | 6 ++-- Source/cmGlobalKdevelopGenerator.cxx | 2 +- Source/cmGlobalNinjaGenerator.cxx | 4 +-- Source/cmGlobalNinjaGenerator.h | 4 +-- Source/cmGlobalVisualStudio7Generator.cxx | 6 ++-- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 4 +-- Source/cmGlobalXCodeGenerator.cxx | 10 +++---- Source/cmLocalGenerator.cxx | 2 +- Source/cmLocalNinjaGenerator.h | 2 +- Source/cmParseArgumentsCommand.cxx | 2 +- Source/cmQtAutoGeneratorInitializer.cxx | 4 +-- Source/cmQtAutoGenerators.cxx | 34 +++++++++++------------ Source/cmQtAutoGenerators.h | 24 ++++++++-------- Source/cmServer.h | 2 +- Source/cmServerProtocol.cxx | 4 +-- Source/cmTarget.cxx | 2 +- Source/cmTarget.h | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Source/cmXMLWriter.h | 2 +- Tests/CompileFeatures/cxx_digit_separators.cpp | 3 +- Tests/CompileFeatures/cxx_raw_string_literals.cpp | 2 +- Tests/CompileFeatures/cxx_variadic_templates.cpp | 18 ++++++------ Tests/Cuda/.clang-format | 9 ------ Tests/CudaOnly/.clang-format | 9 ------ 52 files changed, 117 insertions(+), 136 deletions(-) delete mode 100644 Tests/Cuda/.clang-format delete mode 100644 Tests/CudaOnly/.clang-format diff --git a/.clang-format b/.clang-format index a8bde41..88bfbd3 100644 --- a/.clang-format +++ b/.clang-format @@ -5,5 +5,4 @@ AlignOperands: false AlwaysBreakAfterReturnType: None AlwaysBreakAfterDefinitionReturnType: None ColumnLimit: 79 -Standard: Cpp03 ... diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index b65eb64..44c7915 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -313,7 +313,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( const std::string& tempDir = tempInstallDirectory; for (it = installDirectoriesVector.begin(); it != installDirectoriesVector.end(); ++it) { - std::vector > symlinkedFiles; + std::vector> symlinkedFiles; cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl); cmsys::Glob gl; std::string top = *it; @@ -377,8 +377,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( } /* rebuild symlinks in the installed tree */ if (!symlinkedFiles.empty()) { - std::vector >::iterator - symlinkedIt; + std::vector>::iterator symlinkedIt; std::string curDir = cmSystemTools::GetCurrentWorkingDirectory(); std::string goToDir = tempDir; goToDir += "/" + subdir; diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 1a339b7..ddc309c 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -64,8 +64,8 @@ bool cmCTestRunTest::CheckOutput() // Check for TIMEOUT_AFTER_MATCH property. if (!this->TestProperties->TimeoutRegularExpressions.empty()) { - std::vector< - std::pair >::iterator regIt; + std::vector>::iterator + regIt; for (regIt = this->TestProperties->TimeoutRegularExpressions.begin(); regIt != this->TestProperties->TimeoutRegularExpressions.end(); ++regIt) { @@ -163,7 +163,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) int res = started ? this->TestProcess->GetProcessStatus() : cmsysProcess_State_Error; int retVal = this->TestProcess->GetExitValue(); - std::vector >::iterator + std::vector>::iterator passIt; bool forceFail = false; bool skipped = false; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 57075c7..18d9346 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -994,8 +994,8 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // tests array for tests which require that fixture and tests which are // setups for that fixture. They are needed at the end to populate // dependencies of the cleanup tests in our final list of tests. - std::map > fixtureRequirements; - std::map > setupFixturesAdded; + std::map> fixtureRequirements; + std::map> setupFixturesAdded; // Use integer index for iteration because we append to // the tests vector as we go @@ -1150,7 +1150,7 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const // This cleanup test could be part of the original test list that was // passed in. It is then possible that no other test requires the // fIt fixture, so we have to check for this. - std::map >::const_iterator cIt = + std::map>::const_iterator cIt = fixtureRequirements.find(fixture); if (cIt != fixtureRequirements.end()) { const std::vector& indices = cIt->second; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index d8627b1..965552c 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -110,11 +110,11 @@ public: std::vector Depends; std::vector AttachedFiles; std::vector AttachOnFail; - std::vector > + std::vector> ErrorRegularExpressions; - std::vector > + std::vector> RequiredRegularExpressions; - std::vector > + std::vector> TimeoutRegularExpressions; std::map Measurements; bool IsInBasedOnREOptions; diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index a4f66a9..b6ea75a 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -120,7 +120,7 @@ struct cmIsPair }; template -struct cmIsPair > +struct cmIsPair> { enum { diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index a0775b3..fc2bd0f 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -42,7 +42,7 @@ bool cmDepends::Write(std::ostream& makeDepends, std::ostream& internalDepends) std::vector pairs; cmSystemTools::ExpandListArgument(srcStr, pairs); - std::map > dependencies; + std::map> dependencies; for (std::vector::iterator si = pairs.begin(); si != pairs.end();) { // Get the source and object file. @@ -53,7 +53,7 @@ bool cmDepends::Write(std::ostream& makeDepends, std::ostream& internalDepends) std::string const& obj = *si++; dependencies[obj].insert(src); } - for (std::map >::const_iterator it = + for (std::map>::const_iterator it = dependencies.begin(); it != dependencies.end(); ++it) { diff --git a/Source/cmELF.h b/Source/cmELF.h index 678a595..8c17348 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -64,7 +64,7 @@ public: }; /** Represent entire dynamic section header */ - typedef std::vector > DynamicEntryList; + typedef std::vector> DynamicEntryList; /** Get the type of the file opened. */ FileType GetFileType() const; diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 408497b..22246b2 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -32,7 +32,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector const& args, this->SetError("called with incorrect number of arguments"); return false; } - std::vector > cmds; + std::vector> cmds; std::string arguments; bool doing_command = false; size_t command_index = 0; diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 547fc99..2c77343 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -63,7 +63,7 @@ cmExtraCodeBlocksGenerator::GetFactory() void cmExtraCodeBlocksGenerator::Generate() { // for each sub project in the project create a codeblocks project - for (std::map >::const_iterator + for (std::map>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { // create a project file @@ -217,7 +217,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile( Tree tree; // build tree of virtual folders - for (std::map >::const_iterator + for (std::map>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { // Collect all files diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index 96502d5..438c854 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -54,13 +54,13 @@ void cmExtraCodeLiteGenerator::Generate() std::string workspaceFileName; std::string workspaceSourcePath; - const std::map >& projectMap = + const std::map>& projectMap = this->GlobalGenerator->GetProjectMap(); // loop projects and locate the root project. // and extract the information for creating the worspace // root makefile - for (std::map >::const_iterator + for (std::map>::const_iterator it = projectMap.begin(); it != projectMap.end(); ++it) { const cmMakefile* mf = it->second[0]->GetMakefile(); @@ -165,7 +165,7 @@ std::vector cmExtraCodeLiteGenerator::CreateProjectsByProjectMaps( { std::vector retval; // for each sub project in the workspace create a codelite project - for (std::map >::const_iterator + for (std::map>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); it++) { diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 684d1f5..bfc490c 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -536,7 +536,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects( this->AppendLinkedResource(xml, "[Subprojects]", "virtual:/virtual", VirtualFolder); - for (std::map >::const_iterator + for (std::map>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { std::string linkSourceDirectory = diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index 5bb424b..bd0a261 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -68,7 +68,7 @@ void cmExtraSublimeTextGenerator::Generate() "CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS"); // for each sub project in the project create a sublime text 2 project - for (std::map >::const_iterator + for (std::map>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { // create a project file diff --git a/Source/cmExtraSublimeTextGenerator.h b/Source/cmExtraSublimeTextGenerator.h index bf6d23f..58fcd22 100644 --- a/Source/cmExtraSublimeTextGenerator.h +++ b/Source/cmExtraSublimeTextGenerator.h @@ -24,7 +24,7 @@ class cmExtraSublimeTextGenerator : public cmExternalMakefileProjectGenerator { public: static cmExternalMakefileProjectGeneratorFactory* GetFactory(); - typedef std::map > MapSourceFileFlags; + typedef std::map> MapSourceFileFlags; cmExtraSublimeTextGenerator(); void Generate() CM_OVERRIDE; diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h index 939a5bc..32542f0 100644 --- a/Source/cmFindCommon.h +++ b/Source/cmFindCommon.h @@ -112,7 +112,7 @@ protected: std::vector SearchPathSuffixes; - std::map > PathGroupLabelMap; + std::map> PathGroupLabelMap; std::vector PathGroupOrder; std::map PathLabelStringMap; std::map LabeledPaths; diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 00b5ff4..3d8b3ba 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -379,7 +379,7 @@ void cmCompiledGeneratorExpression::GetMaxLanguageStandard( const cmGeneratorTarget* tgt, std::map& mapping) { typedef std::map > + std::map> MapType; MapType::const_iterator it = this->MaxLanguageStandard.find(tgt); if (it != this->MaxLanguageStandard.end()) { diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 9d9ae4e..d22a191 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -143,7 +143,7 @@ private: mutable std::set AllTargetsSeen; mutable std::set SeenTargetProperties; mutable std::map > + std::map> MaxLanguageStandard; mutable std::string Output; mutable bool HadContextSensitiveCondition; diff --git a/Source/cmGeneratorExpressionContext.h b/Source/cmGeneratorExpressionContext.h index cf292dc..5b0123e 100644 --- a/Source/cmGeneratorExpressionContext.h +++ b/Source/cmGeneratorExpressionContext.h @@ -26,7 +26,7 @@ struct cmGeneratorExpressionContext std::set AllTargets; std::set SeenTargetProperties; std::set SourceSensitiveTargets; - std::map > + std::map> MaxLanguageStandard; cmLocalGenerator* LG; std::string Config; diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index c026631..f0eafb4 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -58,7 +58,7 @@ void cmGeneratorExpressionDAGChecker::Initialize() TEST_TRANSITIVE_PROPERTY_METHOD) false)) // NOLINT(clang-tidy) #undef TEST_TRANSITIVE_PROPERTY_METHOD { - std::map >::const_iterator it = + std::map>::const_iterator it = top->Seen.find(this->Target); if (it != top->Seen.end()) { const std::set& propSet = it->second; diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index a3974ab..3f73fca 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -82,7 +82,7 @@ private: const cmGeneratorExpressionDAGChecker* const Parent; const std::string Target; const std::string Property; - std::map > Seen; + std::map> Seen; const GeneratorExpressionContent* const Content; const cmListFileBacktrace Backtrace; Result CheckResult; diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index f2dbc26..c73d486 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -25,13 +25,13 @@ std::string GeneratorExpressionContent::ProcessArbitraryContent( const cmGeneratorExpressionNode* node, const std::string& identifier, cmGeneratorExpressionContext* context, cmGeneratorExpressionDAGChecker* dagChecker, - std::vector >::const_iterator + std::vector>::const_iterator pit) const { std::string result; const std::vector< - std::vector >::const_iterator pend = + std::vector>::const_iterator pend = this->ParamChildren.end(); for (; pit != pend; ++pit) { std::vector::const_iterator it = @@ -122,10 +122,10 @@ std::string GeneratorExpressionContent::EvaluateParameters( { const int numExpected = node->NumExpectedParameters(); { - std::vector >::const_iterator + std::vector>::const_iterator pit = this->ParamChildren.begin(); const std::vector< - std::vector >::const_iterator pend = + std::vector>::const_iterator pend = this->ParamChildren.end(); const bool acceptsArbitraryContent = node->AcceptsArbitraryContentParameter(); @@ -188,5 +188,5 @@ GeneratorExpressionContent::~GeneratorExpressionContent() { cmDeleteAll(this->IdentifierChildren); std::for_each(this->ParamChildren.begin(), this->ParamChildren.end(), - cmDeleteAll >); + cmDeleteAll>); } diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index a7e5f6f..cdf89d7 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -71,7 +71,7 @@ struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator } void SetParameters( - std::vector > const& + std::vector> const& parameters) { this->ParamChildren = parameters; @@ -100,12 +100,12 @@ private: const cmGeneratorExpressionNode* node, const std::string& identifier, cmGeneratorExpressionContext* context, cmGeneratorExpressionDAGChecker* dagChecker, - std::vector >::const_iterator + std::vector>::const_iterator pit) const; private: std::vector IdentifierChildren; - std::vector > ParamChildren; + std::vector> ParamChildren; const char* StartContent; size_t ContentLength; }; diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 7d34293..44c93ec 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1320,7 +1320,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode } context->HadHeadSensitiveCondition = true; - typedef std::map > LangMap; + typedef std::map> LangMap; static LangMap availableFeatures; LangMap testedFeatures; @@ -1390,7 +1390,7 @@ static const char* targetPolicyWhitelist[] = { nullptr #define TARGET_POLICY_STRING(POLICY) , #POLICY - CM_FOR_EACH_TARGET_POLICY(TARGET_POLICY_STRING) + CM_FOR_EACH_TARGET_POLICY(TARGET_POLICY_STRING) #undef TARGET_POLICY_STRING }; diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index c33349a..278de04 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -97,7 +97,7 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( return; } - std::vector > parameters; + std::vector> parameters; std::vector::const_iterator> commaTokens; std::vector::const_iterator colonToken; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index a0a3f4f..4e412f3 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -749,7 +749,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory( config_upper = cmSystemTools::UpperCase(config); } - typedef std::map > IncludeCacheType; + typedef std::map> IncludeCacheType; IncludeCacheType::const_iterator iter = this->SystemIncludesCache.find(config_upper); diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 85311a7..1ee8a16 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -661,7 +661,7 @@ private: SourceEntriesType SourceDepends; mutable std::map Objects; std::set ExplicitObjectName; - mutable std::map > SystemIncludesCache; + mutable std::map> SystemIncludesCache; mutable std::string ExportMacro; diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 7032cd5..4f799ba 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -439,7 +439,7 @@ cmGhsMultiTargetGenerator::GetObjectNames( cmLocalGhsMultiGenerator* const localGhsMultiGenerator, cmGeneratorTarget* const generatorTarget) { - std::map > filenameToSource; + std::map> filenameToSource; std::map sourceToFilename; for (std::vector::const_iterator sf = objectSources->begin(); sf != objectSources->end(); ++sf) { @@ -451,7 +451,7 @@ cmGhsMultiTargetGenerator::GetObjectNames( } std::vector duplicateSources; - for (std::map >::const_iterator + for (std::map>::const_iterator msvSourceI = filenameToSource.begin(); msvSourceI != filenameToSource.end(); ++msvSourceI) { if (msvSourceI->second.size() > 1) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 7ff141d..3931ab8 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -316,7 +316,7 @@ public: TargetDependSet const& GetTargetDirectDepends( const cmGeneratorTarget* target); - const std::map >& GetProjectMap() + const std::map>& GetProjectMap() const { return this->ProjectMap; @@ -468,7 +468,7 @@ protected: std::vector LocalGenerators; cmMakefile* CurrentConfigureMakefile; // map from project name to vector of local generators in that project - std::map > ProjectMap; + std::map> ProjectMap; // Set of named installation components requested by the project. std::set InstallComponents; @@ -580,7 +580,7 @@ private: // track targets to issue CMP0068 warning for. std::set CMP0068WarnTargets; - mutable std::map > + mutable std::map> FilenameTargetDepends; #if defined(CMAKE_BUILD_WITH_CMAKE) diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 39ac73a..c337ab0 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -49,7 +49,7 @@ void cmGlobalKdevelopGenerator::Generate() { // for each sub project in the project create // a kdevelop project - for (std::map >::const_iterator + for (std::map>::const_iterator it = this->GlobalGenerator->GetProjectMap().begin(); it != this->GlobalGenerator->GetProjectMap().end(); ++it) { std::string outputDir = it->second[0]->GetCurrentBinaryDirectory(); diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index de3546b..c9cd0fd 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -952,7 +952,7 @@ void cmGlobalNinjaGenerator::AddDependencyToAll(const std::string& input) void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies() { - for (std::map >::iterator i = + for (std::map>::iterator i = this->AssumedSourceDependencies.begin(); i != this->AssumedSourceDependencies.end(); ++i) { cmNinjaDeps deps; @@ -1260,7 +1260,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) } // remove all source files we know will exist. - typedef std::map >::const_iterator map_it; + typedef std::map>::const_iterator map_it; for (map_it i = this->AssumedSourceDependencies.begin(); i != this->AssumedSourceDependencies.end(); ++i) { knownDependencies.insert(this->ConvertToNinjaPath(i->first)); diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 87affdc..4a8ebe7 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -446,13 +446,13 @@ private: std::set CombinedBuildOutputs; /// The mapping from source file to assumed dependencies. - std::map > AssumedSourceDependencies; + std::map> AssumedSourceDependencies; typedef std::map TargetAliasMap; TargetAliasMap TargetAliases; typedef std::map > + std::set> TargetDependsClosureMap; TargetDependsClosureMap TargetDependsClosures; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index b155f5b..2ed51a0 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -334,7 +334,7 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile( // output the SLN file void cmGlobalVisualStudio7Generator::OutputSLNFile() { - std::map >::iterator it; + std::map>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { this->OutputSLNFile(it->second[0], it->second); } @@ -467,7 +467,7 @@ void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) const char* prefix = "CMAKE_FOLDER_GUID_"; const std::string::size_type skip_prefix = strlen(prefix); std::string guidProjectTypeFolder = "2150E333-8FDC-42A3-9474-1A3956D46DE8"; - for (std::map >::iterator iter = + for (std::map>::iterator iter = VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter) { std::string fullName = iter->first; @@ -487,7 +487,7 @@ void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) void cmGlobalVisualStudio7Generator::WriteFoldersContent(std::ostream& fout) { - for (std::map >::iterator iter = + for (std::map>::iterator iter = VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter) { std::string key(iter->first); diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 32a8d60..788c431 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -156,7 +156,7 @@ protected: virtual void WriteFolders(std::ostream& fout); virtual void WriteFoldersContent(std::ostream& fout); - std::map > VisualStudioFolders; + std::map> VisualStudioFolders; // Set during OutputSLNFile with the name of the current project. // There is one SLN file per project. diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index f85e409..d7ea35a 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -58,7 +58,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() const char* no_working_dir = 0; std::vector no_depends; cmCustomCommandLines no_commands; - std::map >::iterator it; + std::map>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { std::vector& gen = it->second; // add the ALL_BUILD to the first local generator of each project @@ -295,7 +295,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() if (!this->cmGlobalGenerator::ComputeTargetDepends()) { return false; } - std::map >::iterator it; + std::map>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { std::vector& gen = it->second; for (std::vector::iterator i = gen.begin(); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 9dbb173..bfc8d9b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -330,7 +330,7 @@ cmLocalGenerator* cmGlobalXCodeGenerator::CreateLocalGenerator(cmMakefile* mf) void cmGlobalXCodeGenerator::AddExtraIDETargets() { - std::map >::iterator it; + std::map>::iterator it; // make sure extra targets are added before calling // the parent generate which will call trace depends for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { @@ -347,7 +347,7 @@ void cmGlobalXCodeGenerator::Generate() if (cmSystemTools::GetErrorOccuredFlag()) { return; } - std::map >::iterator it; + std::map>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { cmLocalGenerator* root = it->second[0]; this->SetGenerationRoot(root); @@ -1089,7 +1089,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( // framework or bundle targets std::vector contentBuildPhases; if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) { - typedef std::map > + typedef std::map> mapOfVectorOfSourceFiles; mapOfVectorOfSourceFiles bundleFiles; for (std::vector::const_iterator i = classes.begin(); @@ -1140,7 +1140,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( // create vector of "resource content file" build phases - only for // framework or bundle targets if (isFrameworkTarget || isBundleTarget || isCFBundleTarget) { - typedef std::map > + typedef std::map> mapOfVectorOfSourceFiles; mapOfVectorOfSourceFiles bundleFiles; for (std::vector::const_iterator i = classes.begin(); @@ -2924,7 +2924,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->CreateObject(cmXCodeObject::XCConfigurationList); cmXCodeObject* buildConfigurations = this->CreateObject(cmXCodeObject::OBJECT_LIST); - typedef std::vector > Configs; + typedef std::vector> Configs; Configs configs; const char* defaultConfigName = "Debug"; for (unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6e0e28c..1e5cd39 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1601,7 +1601,7 @@ void cmLocalGenerator::AddCompilerRequirementFlag( return; } - static std::map > langStdMap; + static std::map> langStdMap; if (langStdMap.empty()) { // Maintain sorted order, most recent first. langStdMap["CXX"].push_back("17"); diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 83bc9d3..b0eb1da 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -105,7 +105,7 @@ private: std::string HomeRelativeOutputPath; - typedef std::map > + typedef std::map> CustomCommandTargetMap; CustomCommandTargetMap CustomCommandTargets; std::vector CustomCommands; diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index d75ee8e..52acd35 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -70,7 +70,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector const& args, // options, single values and multi values typedef std::map options_map; typedef std::map single_map; - typedef std::map > multi_map; + typedef std::map> multi_map; options_map options; single_map single; multi_map multi; diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 07fb528..ebfb6f0 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -858,7 +858,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( // Extract relevant source files std::vector generatedSources; - std::vector > qrcSources; + std::vector> qrcSources; { const std::string qrcExt = "qrc"; std::vector srcFiles; @@ -914,7 +914,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( const std::string qtMajorVersion = GetQtMajorVersion(target); const std::string rccCommand = RccGetExecutable(target, qtMajorVersion); const cmFilePathChecksum fpathCheckSum(makefile); - for (std::vector >::const_iterator it = + for (std::vector>::const_iterator it = qrcSources.begin(); it != qrcSources.end(); ++it) { const std::string& absFile = it->first; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index e51033a..d7f1ea7 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -750,8 +750,8 @@ bool cmQtAutoGenerators::RunAutogen() // key = moc source filepath, value = moc output filepath std::map mocsIncluded; std::map mocsNotIncluded; - std::map > mocDepends; - std::map > uisIncluded; + std::map> mocDepends; + std::map> uisIncluded; // collects all headers which may need to be mocced std::set mocHeaderFiles; std::set uicHeaderFiles; @@ -828,7 +828,7 @@ bool cmQtAutoGenerators::MocRequired(const std::string& contentText, void cmQtAutoGenerators::MocFindDepends( const std::string& absFilename, const std::string& contentText, - std::map >& mocDepends) + std::map>& mocDepends) { for (std::vector::iterator fit = this->MocDependFilters.begin(); @@ -899,8 +899,8 @@ bool cmQtAutoGenerators::UicSkip(const std::string& absFilename) const bool cmQtAutoGenerators::ParseSourceFile( const std::string& absFilename, std::map& mocsIncluded, - std::map >& mocDepends, - std::map >& uisIncluded, bool relaxed) + std::map>& mocDepends, + std::map>& uisIncluded, bool relaxed) { std::string contentText; bool success = ReadAll(contentText, absFilename); @@ -931,7 +931,7 @@ bool cmQtAutoGenerators::ParseSourceFile( void cmQtAutoGenerators::UicParseContent( const std::string& absFilename, const std::string& contentText, - std::map >& uisIncluded) + std::map>& uisIncluded) { if (this->Verbose) { this->LogInfo("AutoUic: Checking " + absFilename); @@ -952,7 +952,7 @@ void cmQtAutoGenerators::UicParseContent( bool cmQtAutoGenerators::MocParseSourceContent( const std::string& absFilename, const std::string& contentText, std::map& mocsIncluded, - std::map >& mocDepends, bool relaxed) + std::map>& mocDepends, bool relaxed) { if (this->Verbose) { this->LogInfo("AutoMoc: Checking " + absFilename); @@ -1148,7 +1148,7 @@ bool cmQtAutoGenerators::MocParseSourceContent( void cmQtAutoGenerators::MocParseHeaderContent( const std::string& absFilename, const std::string& contentText, std::map& mocsNotIncluded, - std::map >& mocDepends) + std::map>& mocDepends) { // Log if (this->Verbose) { @@ -1196,8 +1196,8 @@ bool cmQtAutoGenerators::ParseHeaders( const std::set& uicHeaderFiles, const std::map& mocsIncluded, std::map& mocsNotIncluded, - std::map >& mocDepends, - std::map >& uisIncluded) + std::map>& mocDepends, + std::map>& uisIncluded) { bool success = true; // Merged header files list to read files only once @@ -1235,7 +1235,7 @@ bool cmQtAutoGenerators::ParseHeaders( bool cmQtAutoGenerators::MocGenerateAll( const std::map& mocsIncluded, const std::map& mocsNotIncluded, - const std::map >& mocDepends) + const std::map>& mocDepends) { if (!this->MocEnabled()) { return true; @@ -1375,7 +1375,7 @@ bool cmQtAutoGenerators::MocGenerateAll( */ bool cmQtAutoGenerators::MocGenerateFile( const std::string& sourceFile, const std::string& mocFileName, - const std::map >& mocDepends, + const std::map>& mocDepends, bool included) { bool mocGenerated = false; @@ -1391,7 +1391,7 @@ bool cmQtAutoGenerators::MocGenerateFile( generateMoc = FileAbsentOrOlder(mocFileAbs, sourceFile); if (!generateMoc) { // Test if a dependency file changed - std::map >::const_iterator dit = + std::map>::const_iterator dit = mocDepends.find(sourceFile); if (dit != mocDepends.end()) { for (std::set::const_iterator fit = dit->second.begin(); @@ -1523,19 +1523,19 @@ bool cmQtAutoGenerators::UicFindIncludedFile(std::string& absFile, } bool cmQtAutoGenerators::UicGenerateAll( - const std::map >& uisIncluded) + const std::map>& uisIncluded) { if (!this->UicEnabled()) { return true; } // single map with input / output names - std::map > sourceGenMap; + std::map> sourceGenMap; { // Collision lookup map std::map testMap; // Compile maps - for (std::map >::const_iterator sit = + for (std::map>::const_iterator sit = uisIncluded.begin(); sit != uisIncluded.end(); ++sit) { const std::string& source(sit->first); @@ -1576,7 +1576,7 @@ bool cmQtAutoGenerators::UicGenerateAll( // generate ui files for (std::map >::const_iterator it = + std::map>::const_iterator it = sourceGenMap.begin(); it != sourceGenMap.end(); ++it) { for (std::map::const_iterator sit = diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index a8eb961..5cb3d9f 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -62,7 +62,7 @@ private: std::string* macroName = nullptr); void MocFindDepends( const std::string& absFilename, const std::string& contentText, - std::map >& mocDepends); + std::map>& mocDepends); bool MocSkip(const std::string& absFilename) const; bool UicSkip(const std::string& absFilename) const; @@ -70,8 +70,8 @@ private: bool ParseSourceFile( const std::string& absFilename, std::map& mocsIncluded, - std::map >& mocDepends, - std::map >& includedUis, + std::map>& mocDepends, + std::map>& includedUis, bool relaxed); void SearchHeadersForSourceFile(const std::string& absFilename, @@ -83,31 +83,31 @@ private: const std::set& uicHeaderFiles, const std::map& mocsIncluded, std::map& mocsNotIncluded, - std::map >& mocDepends, - std::map >& includedUis); + std::map>& mocDepends, + std::map>& includedUis); void UicParseContent( const std::string& fileName, const std::string& contentText, - std::map >& includedUis); + std::map>& includedUis); bool MocParseSourceContent( const std::string& absFilename, const std::string& contentText, std::map& mocsIncluded, - std::map >& mocDepends, bool relaxed); + std::map>& mocDepends, bool relaxed); void MocParseHeaderContent( const std::string& absFilename, const std::string& contentText, std::map& mocsNotIncluded, - std::map >& mocDepends); + std::map>& mocDepends); // -- Moc file generation bool MocGenerateAll( const std::map& mocsIncluded, const std::map& mocsNotIncluded, - const std::map >& mocDepends); + const std::map>& mocDepends); bool MocGenerateFile( const std::string& sourceFile, const std::string& mocFileName, - const std::map >& mocDepends, + const std::map>& mocDepends, bool included); // -- Uic file generation @@ -115,7 +115,7 @@ private: const std::string& searchPath, const std::string& searchFile); bool UicGenerateAll( - const std::map >& includedUis); + const std::map>& includedUis); bool UicGenerateFile(const std::string& realName, const std::string& uiInputFile, const std::string& uiOutputFile); @@ -216,7 +216,7 @@ private: bool RccRunFailed; std::vector RccSources; std::map RccOptions; - std::map > RccInputs; + std::map> RccInputs; }; #endif diff --git a/Source/cmServer.h b/Source/cmServer.h index eafd860..9d8473d 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -62,7 +62,7 @@ public: void OnDisconnect(cmConnection* pConnection); protected: - std::vector > Connections; + std::vector> Connections; bool ServeThreadRunning = false; uv_thread_t ServeThread; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 2bcfefd..2b0a826 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -591,7 +591,7 @@ public: std::string Language; std::string Flags; std::vector Defines; - std::vector > IncludePathList; + std::vector> IncludePathList; }; bool LanguageData::operator==(const LanguageData& other) const @@ -686,7 +686,7 @@ static Json::Value DumpSourceFilesList( std::vector files; target->GetSourceFiles(files, config); - std::unordered_map > fileGroups; + std::unordered_map> fileGroups; for (cmSourceFile* file : files) { LanguageData fileData; fileData.Language = file->GetLanguage(); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1ca013c..4d93810 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -714,7 +714,7 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const const char* sigString = (sig == cmTarget::KeywordTLLSignature ? "keyword" : "plain"); s << "The uses of the " << sigString << " signature are here:\n"; - typedef std::vector > Container; + typedef std::vector> Container; cmOutputConverter converter(this->GetMakefile()->GetStateSnapshot()); for (Container::const_iterator it = this->TLLCommands.begin(); it != this->TLLCommands.end(); ++it) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c335c81..940e26c 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -297,7 +297,7 @@ private: std::vector PreBuildCommands; std::vector PreLinkCommands; std::vector PostBuildCommands; - std::vector > TLLCommands; + std::vector> TLLCommands; LinkLibraryVectorType OriginalLinkLibraries; cmMakefile* Makefile; cmTargetInternalPointer Internal; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0e73806..86099eb 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -642,7 +642,7 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferences() this->WriteDotNetReference(*ri, ""); } } - for (std::vector >::const_iterator i = + for (std::vector>::const_iterator i = hintReferences.begin(); i != hintReferences.end(); ++i) { this->WriteDotNetReference(i->first, i->second); diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h index 9d89fec..981255d 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -107,7 +107,7 @@ private: private: std::ostream& Output; - std::stack > Elements; + std::stack> Elements; std::string IndentationElement; std::size_t Level; bool ElementOpen; diff --git a/Tests/CompileFeatures/cxx_digit_separators.cpp b/Tests/CompileFeatures/cxx_digit_separators.cpp index a40ac0a..abcd1c8 100644 --- a/Tests/CompileFeatures/cxx_digit_separators.cpp +++ b/Tests/CompileFeatures/cxx_digit_separators.cpp @@ -1,5 +1,6 @@ int someFunc() { - int one_thousand = 1'000; return one_thousand - 1000; + int one_thousand = 1'000; + return one_thousand - 1000; } diff --git a/Tests/CompileFeatures/cxx_raw_string_literals.cpp b/Tests/CompileFeatures/cxx_raw_string_literals.cpp index ea4d231..0f83a7c 100644 --- a/Tests/CompileFeatures/cxx_raw_string_literals.cpp +++ b/Tests/CompileFeatures/cxx_raw_string_literals.cpp @@ -1,7 +1,7 @@ void someFunc() { -const char p[] = R"(a\ + const char p[] = R"(a\ b c)"; } diff --git a/Tests/CompileFeatures/cxx_variadic_templates.cpp b/Tests/CompileFeatures/cxx_variadic_templates.cpp index 3dc2570..6951230 100644 --- a/Tests/CompileFeatures/cxx_variadic_templates.cpp +++ b/Tests/CompileFeatures/cxx_variadic_templates.cpp @@ -35,7 +35,7 @@ struct eval }; template