From 71fbebd1dc3a24e2478bb5704d9ac20f36cbf704 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 10 Jul 2019 11:38:48 -0400 Subject: IWYU: Fix handling of standard header An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of ``. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `` inclusions to follow the now-correct IWYU lints. --- Source/CPack/cmCPackGenerator.cxx | 2 +- Source/CPack/cpack.cxx | 1 - Source/CTest/cmCTestLaunch.cxx | 1 - Source/CTest/cmCTestMultiProcessHandler.cxx | 2 ++ Source/CTest/cmCTestRunTest.h | 3 ++- Source/CTest/cmCTestTestHandler.cxx | 2 +- Source/CTest/cmCTestUpdateHandler.cxx | 2 +- Source/cmBinUtilsLinuxELFLinker.h | 2 +- Source/cmBinUtilsMacOSMachOLinker.h | 2 +- Source/cmBinUtilsWindowsPELinker.h | 2 +- Source/cmCTest.cxx | 2 +- Source/cmCTest.h | 2 +- Source/cmComputeLinkDepends.h | 1 + Source/cmCryptoHash.cxx | 2 +- Source/cmCryptoHash.h | 2 +- Source/cmCustomCommandGenerator.cxx | 2 +- Source/cmELF.cxx | 2 +- Source/cmExecuteProcessCommand.cxx | 3 +++ Source/cmExportBuildAndroidMKGenerator.cxx | 1 - Source/cmExportFileGenerator.cxx | 2 +- Source/cmExportLibraryDependenciesCommand.cxx | 2 +- Source/cmExportTryCompileFileGenerator.cxx | 2 +- Source/cmFileAPI.h | 2 +- Source/cmFileAPICodemodel.cxx | 1 + Source/cmFileCommand.cxx | 2 +- Source/cmFileTimes.h | 2 +- Source/cmFindPackageCommand.cxx | 2 +- Source/cmForEachCommand.cxx | 2 +- Source/cmGeneratorExpression.cxx | 2 +- Source/cmGeneratorExpression.h | 2 +- Source/cmGeneratorExpressionEvaluationFile.cxx | 2 +- Source/cmGeneratorExpressionEvaluationFile.h | 2 +- Source/cmGeneratorExpressionNode.cxx | 2 +- Source/cmGeneratorTarget.cxx | 2 +- Source/cmGhsMultiTargetGenerator.cxx | 2 ++ Source/cmGlobalGenerator.h | 1 + Source/cmGlobalNinjaGenerator.cxx | 2 +- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmGlobalUnixMakefileGenerator3.cxx | 1 + Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmGraphVizWriter.cxx | 2 +- Source/cmIfCommand.cxx | 2 +- Source/cmInstallDirectoryGenerator.cxx | 2 +- Source/cmInstallFilesGenerator.cxx | 2 +- Source/cmInstallScriptGenerator.cxx | 1 + Source/cmInstallTargetGenerator.cxx | 1 + Source/cmInstalledFile.h | 2 +- Source/cmJsonObjects.cxx | 1 + Source/cmListCommand.cxx | 2 ++ Source/cmListFileCache.h | 2 +- Source/cmLocalGenerator.cxx | 4 +++- Source/cmLocalNinjaGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 2 +- Source/cmLocalVisualStudioGenerator.h | 2 +- Source/cmMakefile.cxx | 2 +- Source/cmMakefile.h | 2 +- Source/cmMakefileExecutableTargetGenerator.cxx | 2 +- Source/cmMakefileLibraryTargetGenerator.cxx | 2 +- Source/cmMakefileTargetGenerator.cxx | 2 +- Source/cmMakefileTargetGenerator.h | 1 + Source/cmMakefileUtilityTargetGenerator.cxx | 1 + Source/cmNinjaNormalTargetGenerator.cxx | 2 +- Source/cmNinjaTargetGenerator.cxx | 2 +- Source/cmNinjaTargetGenerator.h | 2 +- Source/cmOrderDirectories.cxx | 1 + Source/cmQtAutoGen.h | 2 +- Source/cmQtAutoGenGlobalInitializer.h | 2 +- Source/cmQtAutoGenInitializer.h | 2 +- Source/cmQtAutoGenerator.cxx | 2 ++ Source/cmQtAutoMocUic.h | 2 +- Source/cmRuntimeDependencyArchive.h | 2 +- Source/cmServer.h | 2 +- Source/cmState.h | 1 + Source/cmStateDirectory.cxx | 1 + Source/cmStringCommand.cxx | 2 +- Source/cmTarget.h | 2 +- Source/cmTestGenerator.cxx | 2 ++ Source/cmUVProcessChain.h | 2 +- Source/cmVariableWatch.h | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Source/cmWhileCommand.cxx | 2 +- Source/cmWorkerPool.h | 2 +- Source/cmake.cxx | 2 +- Source/cmake.h | 2 +- Source/cmcmd.cxx | 2 +- Tests/CMakeLib/testUVProcessChain.cxx | 1 + Tests/CMakeServerLib/testServerBuffering.cpp | 2 ++ Utilities/IWYU/mapping.imp | 11 +++++++++-- 88 files changed, 104 insertions(+), 69 deletions(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7e07ff4..4a91698 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -7,7 +7,7 @@ #include "cmsys/RegularExpression.hxx" #include #include -#include // IWYU pragma: keep +#include #include #include "cmCPackComponentGroup.h" diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 58b9e70..67b7ea6 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -5,7 +5,6 @@ #include "cmsys/Encoding.hxx" #include #include -#include // IWYU pragma: keep #include #include #include diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index a96513e..237ca82 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -6,7 +6,6 @@ #include "cmsys/Process.h" #include "cmsys/RegularExpression.hxx" #include -#include // IWYU pragma: keep #include #include diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index ef63073..37a8abf 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -29,11 +29,13 @@ #include #include #include +#include #include #include #include #include #include +#include namespace cmsys { class RegularExpression; diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index 38cc417..43dfe8e 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include #include #include #include @@ -12,7 +13,7 @@ #include "cmCTestTestHandler.h" #include "cmDuration.h" -#include "cmProcess.h" // IWYU pragma: keep (for unique_ptr) +#include "cmProcess.h" class cmCTest; class cmCTestMultiProcessHandler; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 0ed56c8..46ef809 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -11,7 +11,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 5cfc4a7..fb97e9b 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -18,7 +18,7 @@ #include "cmXMLWriter.h" #include -#include // IWYU pragma: keep +#include #include static const char* cmCTestUpdateHandlerUpdateStrings[] = { diff --git a/Source/cmBinUtilsLinuxELFLinker.h b/Source/cmBinUtilsLinuxELFLinker.h index 348edc4..e209637 100644 --- a/Source/cmBinUtilsLinuxELFLinker.h +++ b/Source/cmBinUtilsLinuxELFLinker.h @@ -9,7 +9,7 @@ #include "cmLDConfigTool.h" #include "cmStateTypes.h" -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmBinUtilsMacOSMachOLinker.h b/Source/cmBinUtilsMacOSMachOLinker.h index 0350d1e..f4f309d 100644 --- a/Source/cmBinUtilsMacOSMachOLinker.h +++ b/Source/cmBinUtilsMacOSMachOLinker.h @@ -8,7 +8,7 @@ #include "cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.h" #include "cmStateTypes.h" -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmBinUtilsWindowsPELinker.h b/Source/cmBinUtilsWindowsPELinker.h index d742195..8d2bf4b 100644 --- a/Source/cmBinUtilsWindowsPELinker.h +++ b/Source/cmBinUtilsWindowsPELinker.h @@ -8,7 +8,7 @@ #include "cmBinUtilsWindowsPEGetRuntimeDependenciesTool.h" #include "cmStateTypes.h" -#include // IWYU pragma: keep +#include #include class cmRuntimeDependencyArchive; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d1226c3..536ca35 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -15,7 +15,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmCTest.h b/Source/cmCTest.h index d300c33..7f66378 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -10,7 +10,7 @@ #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 0b1f00c..839c27a 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -10,6 +10,7 @@ #include "cmTargetLinkLibraryType.h" #include +#include #include #include #include diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index d914eb1..4310eed 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -8,7 +8,7 @@ #include "cmsys/FStream.hxx" #include -#include // IWYU pragma: keep +#include static unsigned int const cmCryptoHashAlgoToId[] = { /* clang-format needs this comment to break after the opening brace */ diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h index b712f09..c7d3377 100644 --- a/Source/cmCryptoHash.h +++ b/Source/cmCryptoHash.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 89aaad0..5e8731a 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -12,7 +12,7 @@ #include "cmStateTypes.h" #include "cmSystemTools.h" -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 2226463..51eb814 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -6,7 +6,7 @@ #include "cm_kwiml.h" #include "cmsys/FStream.hxx" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 494afbb..121f33f 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -4,10 +4,13 @@ #include "cm_static_string_view.hxx" #include "cmsys/Process.h" + #include #include /* isspace */ #include +#include #include +#include #include "cmAlgorithms.h" #include "cmArgumentParser.h" diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index ced27c9..e693155 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -3,7 +3,6 @@ #include "cmExportBuildAndroidMKGenerator.h" #include -#include // IWYU pragma: keep #include #include diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index c366183..e1c098d 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -20,7 +20,7 @@ #include "cmsys/FStream.hxx" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index b60a053..2e86533 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -4,7 +4,7 @@ #include "cmsys/FStream.hxx" #include -#include // IWYU pragma: keep +#include #include #include "cmAlgorithms.h" diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index c169032..a3c9802 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -13,7 +13,7 @@ #include "cmTarget.h" #include -#include // IWYU pragma: keep +#include #include cmExportTryCompileFileGenerator::cmExportTryCompileFileGenerator( diff --git a/Source/cmFileAPI.h b/Source/cmFileAPI.h index 602efa8..aa5a42f 100644 --- a/Source/cmFileAPI.h +++ b/Source/cmFileAPI.h @@ -10,7 +10,7 @@ #include "cm_jsoncpp_writer.h" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 0fb166a..73b4123 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 980ad21..dfba910 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -13,7 +13,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmFileTimes.h b/Source/cmFileTimes.h index cbf0fe2..191d89e 100644 --- a/Source/cmFileTimes.h +++ b/Source/cmFileTimes.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include // IWYU pragma: keep +#include #include /** \class cmFileTimes diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 50ae6a9..783b5f6 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -13,7 +13,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 08003eb..7f189d6 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmForEachCommand.h" -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 175a26d..4d3a005 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -3,7 +3,7 @@ #include "cmGeneratorExpression.h" #include "cmsys/RegularExpression.hxx" -#include // IWYU pragma: keep +#include #include #include "assert.h" diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index fd36c4b..ef76651 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -8,7 +8,7 @@ #include "cmListFileCache.h" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index 326cb0e..11c2dcc 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -3,7 +3,7 @@ #include "cmGeneratorExpressionEvaluationFile.h" #include "cmsys/FStream.hxx" -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 89a2390..06ebeac 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index a60c75c..d828dac 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -33,7 +33,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 85a8dbb..845937a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -7,7 +7,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index b80da72..997595b 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -22,9 +22,11 @@ #include "cmTarget.h" #include +#include #include #include #include +#include cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget* target) : GeneratorTarget(target) diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 7fd5433..e36825c 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 2d52356..98e8339 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -9,7 +9,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 15dd404..99afc1d 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -7,7 +7,7 @@ #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index aa584ad..93f5482 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7c2bcd3..78e8f30 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -5,7 +5,7 @@ #include "cmsys/RegularExpression.hxx" #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index a75d8a9..9befb78 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -4,7 +4,7 @@ #include #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index d1f8f58..6f32861 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -11,7 +11,7 @@ #include "cmSystemTools.h" #include "cmake.h" -#include // IWYU pragma: keep +#include static std::string cmIfCommandError( std::vector const& args) diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx index 14288f6..c8ebc8c 100644 --- a/Source/cmInstallDirectoryGenerator.cxx +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -8,7 +8,7 @@ #include "cmMakefile.h" #include "cmSystemTools.h" -#include // IWYU pragma: keep +#include cmInstallDirectoryGenerator::cmInstallDirectoryGenerator( std::vector const& dirs, const char* dest, diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index 2ed9f73..e8e82cc 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -6,7 +6,7 @@ #include "cmInstallType.h" #include "cmSystemTools.h" -#include // IWYU pragma: keep +#include class cmLocalGenerator; diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 5832d27..b7b7817 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallScriptGenerator.h" +#include #include #include diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 0774436..d891ad8 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/Source/cmInstalledFile.h b/Source/cmInstalledFile.h index b7d602e..eb827be 100644 --- a/Source/cmInstalledFile.h +++ b/Source/cmInstalledFile.h @@ -8,7 +8,7 @@ #include "cmGeneratorExpression.h" #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx index 8d065e1..505188f 100644 --- a/Source/cmJsonObjects.cxx +++ b/Source/cmJsonObjects.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 1b01ea2..e9a4a6f 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -7,12 +7,14 @@ #include #include #include +#include #include #include #include #include #include // required for atoi #include +#include #include "cmAlgorithms.h" #include "cmGeneratorExpression.h" diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 9457415..5de1a74 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 801f0e8..0f730c9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -26,22 +26,24 @@ #include "cmTestGenerator.h" #include "cmVersion.h" #include "cmake.h" +#include "cmsys/RegularExpression.hxx" #if defined(CMAKE_BUILD_WITH_CMAKE) # define CM_LG_ENCODE_OBJECT_NAMES # include "cmCryptoHash.h" #endif -#include "cmsys/RegularExpression.hxx" #include #include #include #include +#include #include #include #include #include #include +#include #if defined(__HAIKU__) # include diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 81cafa3..248f4a6 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -5,7 +5,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index c392e97..1b4f428 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -5,7 +5,7 @@ #include "cmsys/FStream.hxx" #include "cmsys/Terminal.h" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 3fdafd2..585eb3c 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include -#include // IWYU pragma: keep +#include #include #include "cmGlobalVisualStudioGenerator.h" diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index bd98f08..5f22a07 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -9,7 +9,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index d223347..d0b70d9 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -8,7 +8,7 @@ #include "cmsys/RegularExpression.hxx" #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 6b9b9c7..2001c1f 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileExecutableTargetGenerator.h" -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b9f7c6d..e5aed01 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileLibraryTargetGenerator.h" -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index b3bab4b..b5a6246 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -2,7 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileTargetGenerator.h" -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index c570a7c..9eeeed0 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index 4236995..70d9fca 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakefileUtilityTargetGenerator.h" +#include #include #include #include diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index f65abc8..d1af9e6 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -6,7 +6,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2139a45..57e500e 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -8,7 +8,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index 3055e18..a99d8e7 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -13,7 +13,7 @@ #include "cmOSXBundleGenerator.h" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 585db42..2d055ff 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -13,6 +13,7 @@ #include #include #include +#include /* Directory ordering computation. diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h index 9c52129..619fff1 100644 --- a/Source/cmQtAutoGen.h +++ b/Source/cmQtAutoGen.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h index d56153a..d7f4cc6 100644 --- a/Source/cmQtAutoGenGlobalInitializer.h +++ b/Source/cmQtAutoGenGlobalInitializer.h @@ -8,7 +8,7 @@ #include "cmQtAutoGen.h" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h index aa073d1..eb0d35e 100644 --- a/Source/cmQtAutoGenInitializer.h +++ b/Source/cmQtAutoGenInitializer.h @@ -8,7 +8,7 @@ #include "cmQtAutoGen.h" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index e1c435b..3a3162d 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -14,6 +14,8 @@ #include "cmSystemTools.h" #include "cmake.h" +#include + cmQtAutoGenerator::Logger::Logger() { // Initialize logger diff --git a/Source/cmQtAutoMocUic.h b/Source/cmQtAutoMocUic.h index 8061c13..dc18328 100644 --- a/Source/cmQtAutoMocUic.h +++ b/Source/cmQtAutoMocUic.h @@ -14,7 +14,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmRuntimeDependencyArchive.h b/Source/cmRuntimeDependencyArchive.h index ec3ecd4..67efec7 100644 --- a/Source/cmRuntimeDependencyArchive.h +++ b/Source/cmRuntimeDependencyArchive.h @@ -9,7 +9,7 @@ #include "cmsys/RegularExpression.hxx" #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmServer.h b/Source/cmServer.h index aba4924..ab2ad23 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -10,7 +10,7 @@ #include "cmUVHandlePtr.h" -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmState.h b/Source/cmState.h index accd838..0649ace 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -6,6 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include +#include #include #include #include diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index 6ca1c9f..3f70ed3 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -6,6 +6,7 @@ #include #include #include +#include #include "cmAlgorithms.h" #include "cmProperty.h" diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 998f904..10ccac0 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -8,7 +8,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmTarget.h b/Source/cmTarget.h index fdcca47..f47cc14 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index 498953e..916784c 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -2,8 +2,10 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTestGenerator.h" +#include #include #include +#include #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" diff --git a/Source/cmUVProcessChain.h b/Source/cmUVProcessChain.h index 2b33520..75f8f66 100644 --- a/Source/cmUVProcessChain.h +++ b/Source/cmUVProcessChain.h @@ -7,7 +7,7 @@ #include #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 1230101..acac2c1 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -6,7 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include -#include // IWYU pragma: keep +#include #include #include diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 0420881..d17a6d8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -19,7 +19,7 @@ #include "windows.h" #include -#include // IWYU pragma: keep +#include #include static void ConvertToWindowsSlash(std::string& s); diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index a01fa6f..0d3bdf8 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -9,7 +9,7 @@ #include "cmMessageType.h" #include "cmSystemTools.h" -#include // IWYU pragma: keep +#include cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf) : Makefile(mf) diff --git a/Source/cmWorkerPool.h b/Source/cmWorkerPool.h index f08bb4f..5cc308b 100644 --- a/Source/cmWorkerPool.h +++ b/Source/cmWorkerPool.h @@ -7,7 +7,7 @@ #include "cmAlgorithms.h" // IWYU pragma: keep -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ca3b405..b8238a2 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -104,7 +104,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmake.h b/Source/cmake.h index c03872b..6aa00e1 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -7,7 +7,7 @@ #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 86082e5..effc094 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -41,7 +41,7 @@ #include #include #include -#include // IWYU pragma: keep +#include #include #include #include diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx index 72ae602..e926350 100644 --- a/Tests/CMakeLib/testUVProcessChain.cxx +++ b/Tests/CMakeLib/testUVProcessChain.cxx @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/Tests/CMakeServerLib/testServerBuffering.cpp b/Tests/CMakeServerLib/testServerBuffering.cpp index 7330ead..8b0b89b 100644 --- a/Tests/CMakeServerLib/testServerBuffering.cpp +++ b/Tests/CMakeServerLib/testServerBuffering.cpp @@ -1,6 +1,8 @@ #include "cmConnection.h" #include "cmServerConnection.h" + #include +#include #include #include diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 0393ff1..4e00214 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -42,10 +42,17 @@ { symbol: [ "std::istringstream", private, "", public ] }, { symbol: [ "std::ostringstream", private, "", public ] }, - # HACK: iwyu suggests those two files each time vector[] is used. + # HACK: iwyu suggests and each time vector[] is used. # https://github.com/include-what-you-use/include-what-you-use/issues/166 { include: [ "", private, "", public ] }, - { include: [ "", public, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits > >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits, std::allocator > > > >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, # TODO: enable this block and remove some includes? #{ symbol: [ "std::pair", private, "", public ] }, -- cgit v0.12