summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-30 12:58:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-03-30 12:58:26 (GMT)
commitd66081b546c55c2066da0eac473b7a1d1d040936 (patch)
treed5fb06e9d1671f9c17725237d40dfd5ec4ee42dc
parent2f359787f6a5d6da20621fb1a161c8cac49902bc (diff)
parent48cfb295a2810e541bd286f352d77d840be345f7 (diff)
downloadCMake-d66081b546c55c2066da0eac473b7a1d1d040936.zip
CMake-d66081b546c55c2066da0eac473b7a1d1d040936.tar.gz
CMake-d66081b546c55c2066da0eac473b7a1d1d040936.tar.bz2
Merge topic 'iwyu'
48cfb295 cmFortranParser: remove unnecessary typedef 90bb5f64 cmCommandArgumentParserHelper: remove unnecessary include ab5f4e81 cmFortranParserImpl: remove unnecessary include f8ed8bef testEncoding: use cmsys::ifstream 8647c6cd testEncoding: include <cmsys/ConsoleBuf.hxx> on Windows only 21a6ed49 cmFileCommand: add <cm_curl.h> include a2275bdd cmFileCommand: remove unnecessary friend declaration Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !626
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx2
-rw-r--r--Source/cmFileCommand.cxx3
-rw-r--r--Source/cmFortranParser.h3
-rw-r--r--Source/cmFortranParserImpl.cxx1
-rw-r--r--Tests/CMakeLib/testEncoding.cxx6
5 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 2d66344..1222d5a 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCommandArgumentParserHelper.h"
-#include <cm_kwiml.h>
-
#include "cmCommandArgumentLexer.h"
#include "cmMakefile.h"
#include "cmState.h"
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 7207d34..63012a5 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -37,6 +37,7 @@
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmCurl.h"
#include "cmFileLockResult.h"
+#include <cm_curl.h>
#endif
#if defined(CMAKE_USE_ELF_PARSER)
@@ -1028,8 +1029,6 @@ protected:
{
}
};
- struct MatchRule;
- friend struct MatchRule;
struct MatchRule
{
cmsys::RegularExpression Regex;
diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h
index e8273fb..024b00a 100644
--- a/Source/cmFortranParser.h
+++ b/Source/cmFortranParser.h
@@ -54,8 +54,7 @@ void cmFortranParser_RuleElse(cmFortranParser* parser);
void cmFortranParser_RuleEndif(cmFortranParser* parser);
/* Define the parser stack element type. */
-typedef union cmFortran_yystype_u cmFortran_yystype;
-union cmFortran_yystype_u
+struct cmFortran_yystype
{
char* string;
};
diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx
index 1a5e6c5..1abe673 100644
--- a/Source/cmFortranParserImpl.cxx
+++ b/Source/cmFortranParserImpl.cxx
@@ -1,7 +1,6 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFortranParser.h"
-#include "cmFortranLexer.h"
#include "cmSystemTools.h"
#include <assert.h>
diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx
index 88743b0..403c896 100644
--- a/Tests/CMakeLib/testEncoding.cxx
+++ b/Tests/CMakeLib/testEncoding.cxx
@@ -1,8 +1,10 @@
-#include <fstream>
+#include <cmsys/FStream.hxx>
#include <iostream>
#include <string>
+#ifdef _WIN32
#include <cmsys/ConsoleBuf.hxx>
+#endif
#ifdef _WIN32
void setEncoding(cmsys::ConsoleBuf::Manager& buf, UINT codepage)
@@ -37,7 +39,7 @@ int main(int argc, char* argv[])
setEncoding(consoleOut, CP_OEMCP);
} // else AUTO
#endif
- std::ifstream file(argv[2]);
+ cmsys::ifstream file(argv[2]);
if (!file.is_open()) {
std::cout << "Failed to open file: " << argv[2] << std::endl;
return 2;