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
This commit is contained in:
Brad King 2017-03-30 12:58:22 +00:00 committed by Kitware Robot
commit d66081b546
5 changed files with 6 additions and 9 deletions

View File

@ -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"

View File

@ -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;

View File

@ -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;
};

View File

@ -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>

View File

@ -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;