Commit cd0881be authored by Brad King's avatar Brad King

IWYU: Update CMake code for IWYU built with Clang 6

IWYU now correctly requires `<utility>` for `std::move`.  It also
requires a container header when used via a range-based for loop.
parent 2033c1e5
......@@ -10,6 +10,7 @@
#include "cmWorkingDirectory.h"
#include <cstring>
#include <map>
#include <ostream>
#include <utility>
#include <vector>
......
......@@ -13,6 +13,7 @@
#include "cmsys/FStream.hxx"
#include <map>
#include <utility>
#include <vector>
......
......@@ -6,6 +6,7 @@
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
......
......@@ -9,6 +9,7 @@
#include <map>
#include <string>
#include <utility>
#include <vector>
cmParseMumpsCoverage::cmParseMumpsCoverage(
cmCTestCoverageHandlerContainer& cont, cmCTest* ctest)
......
......@@ -7,7 +7,6 @@
#include "cmCTestTestHandler.h"
#include "cmsys/Process.h"
#include <algorithm>
#include <fcntl.h>
#include <iostream>
#include <signal.h>
......@@ -15,6 +14,7 @@
#if !defined(_WIN32)
# include <unistd.h>
#endif
#include <utility>
#define CM_PROCESS_BUF_SIZE 65536
......
......@@ -5,6 +5,7 @@
#include "cmsys/Directory.hxx"
#include <algorithm>
#include <stddef.h>
#include <utility>
#include "cmAlgorithms.h"
#include "cmMakefile.h"
......
......@@ -4,6 +4,7 @@
#include "cmAlgorithms.h"
#include "cmExportSet.h"
#include "cmExportSetMap.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
......@@ -21,8 +22,6 @@
#include <sstream>
#include <utility>
class cmExportSetMap;
cmExportInstallFileGenerator::cmExportInstallFileGenerator(
cmInstallExportGenerator* iegen)
: IEGen(iegen)
......
......@@ -5,6 +5,7 @@
#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <assert.h>
#include <map>
#include <sstream>
#include <stdio.h>
#include <utility>
......
......@@ -12,6 +12,7 @@
#include "cm_jsoncpp_value.h"
#include <string>
#include <vector>
namespace {
......
......@@ -10,6 +10,7 @@
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
namespace {
......
......@@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utility>
#include <vector>
#include "cmAlgorithms.h"
......
......@@ -7,6 +7,7 @@
#include <set>
#include <stdio.h>
#include <string.h>
#include <utility>
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
......
......@@ -4,6 +4,7 @@
#include <algorithm>
#include <set>
#include <utility>
#include "cmGeneratorExpression.h"
#include "cmMakefile.h"
......
......@@ -3,6 +3,7 @@
#include "cmInstallExportGenerator.h"
#include <algorithm>
#include <map>
#include <sstream>
#include <utility>
......
......@@ -14,6 +14,7 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmProperty.h"
#include "cmPropertyMap.h"
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateDirectory.h"
......
......@@ -12,6 +12,7 @@
#include <stdexcept>
#include <stdio.h>
#include <stdlib.h> // required for atoi
#include <utility>
#include "cmAlgorithms.h"
#include "cmGeneratorExpression.h"
......
......@@ -6,6 +6,7 @@
#include <memory> // IWYU pragma: keep
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "cmGeneratedFileStream.h"
......
......@@ -6,6 +6,7 @@
#include <memory> // IWYU pragma: keep
#include <sstream>
#include <stddef.h>
#include <utility>
#include <vector>
#include "cmGeneratedFileStream.h"
......
......@@ -9,6 +9,7 @@
#include <memory> // IWYU pragma: keep
#include <set>
#include <sstream>
#include <utility>
#include "cmAlgorithms.h"
#include "cmCustomCommandGenerator.h"
......
......@@ -10,6 +10,7 @@
#include <map>
#include <memory> // IWYU pragma: keep
#include <sstream>
#include <utility>
#include "cmAlgorithms.h"
#include "cmComputeLinkInformation.h"
......
......@@ -2,7 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmPipeConnection.h"
#include <algorithm>
#include <utility>
#include "cmServer.h"
......
......@@ -9,6 +9,7 @@
#include <algorithm>
#include <iterator>
#include <sstream>
#include <utility>
// - Static variables
......
......@@ -14,6 +14,7 @@
#include "cmake.h"
#include <algorithm>
#include <utility>
// -- Class methods
......
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoGeneratorMocUic.h"
#include "cmQtAutoGen.h"
#include <algorithm>
#include <array>
#include <cstddef>
#include <functional>
#include <list>
#include <memory>
#include <set>
#include <sstream>
#include <utility>
#include "cmAlgorithms.h"
#include "cmCryptoHash.h"
#include "cmMakefile.h"
#include "cmQtAutoGen.h"
#include "cmSystemTools.h"
#include "cmake.h"
......
......@@ -11,7 +11,6 @@
#include "cm_uv.h"
#include "cmsys/RegularExpression.hxx"
#include <algorithm>
#include <condition_variable>
#include <cstddef>
#include <deque>
......@@ -21,6 +20,7 @@
#include <set>
#include <string>
#include <thread>
#include <utility>
#include <vector>
class cmMakefile;
......
......@@ -7,13 +7,13 @@
#include "cmServerDictionary.h"
#include "cm_uv.h"
#include <algorithm>
#ifdef _WIN32
# include "io.h"
#else
# include <unistd.h>
#endif
#include <cassert>
#include <utility>
cmStdIoConnection::cmStdIoConnection(
cmConnectionBufferStrategy* bufferStrategy)
......
......@@ -15,6 +15,7 @@
#include <ostream>
#include <string>
#include <type_traits>
#include <utility>
namespace cm {
......
......@@ -11,12 +11,11 @@
#include "cmLocalGenerator.h"
#include "cmOutputConverter.h"
#include "cmProperty.h"
#include "cmPropertyMap.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cmTest.h"
class cmPropertyMap;
cmTestGenerator::cmTestGenerator(
cmTest* test, std::vector<std::string> const& configurations)
: cmScriptGenerator("CTEST_CONFIGURATION_TYPE", configurations)
......
......@@ -44,6 +44,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <utility>
class cmConnection;
......
#include "cmUVHandlePtr.h"
#include <algorithm>
#include <chrono>
#include <iostream>
#include <thread>
#include <utility>
#include "cm_uv.h"
......
......@@ -55,6 +55,9 @@
# HACK: iwyu wrongly thinks that <system_error> is needed for std::hash
{ symbol: [ "std::hash", private, "<functional>", public ] },
# HACK: iwyu thinks we use a libstdc++ private type
{ symbol: [ "__gnu_cxx::size_t", private, "<cstddef>", public ] },
# __decay_and_strip is used internally in the C++11 standard library.
# IWYU does not classify it as internal and suggests to add <type_traits>.
# To ignore it, we simply map it to a file that is included anyway.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment