forked from qt-creator/qt-creator
C++: Use #pragma once in cplusplus-update-frontend
Change-Id: Ie4821a04706ee55b4ec17cf73356c15c333b3324 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
bde0f1b0ff
commit
c9345084c7
@@ -26,8 +26,7 @@
|
|||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H
|
#pragma once
|
||||||
#define CPLUSPLUS_AST_PATTERN_BUILDER_H
|
|
||||||
|
|
||||||
#include "CPlusPlusForwardDeclarations.h"
|
#include "CPlusPlusForwardDeclarations.h"
|
||||||
#include "AST.h"
|
#include "AST.h"
|
||||||
@@ -1385,5 +1384,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // end of namespace CPlusPlus
|
} // end of namespace CPlusPlus
|
||||||
|
|
||||||
#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H
|
|
||||||
|
@@ -1246,8 +1246,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
QTextStream out(&file);
|
QTextStream out(&file);
|
||||||
out << copyrightHeader <<
|
out << copyrightHeader <<
|
||||||
"\n"
|
"\n"
|
||||||
"#ifndef CPLUSPLUS_ASTVISITOR_H\n"
|
"#pragma once\n"
|
||||||
"#define CPLUSPLUS_ASTVISITOR_H\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"#include \"CPlusPlusForwardDeclarations.h\"\n"
|
"#include \"CPlusPlusForwardDeclarations.h\"\n"
|
||||||
"#include \"ASTfwd.h\"\n"
|
"#include \"ASTfwd.h\"\n"
|
||||||
@@ -1317,9 +1316,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
" TranslationUnit *_translationUnit;\n"
|
" TranslationUnit *_translationUnit;\n"
|
||||||
"};\n"
|
"};\n"
|
||||||
"\n"
|
"\n"
|
||||||
"} // namespace CPlusPlus\n"
|
"} // namespace CPlusPlus\n";
|
||||||
"\n"
|
|
||||||
"#endif // CPLUSPLUS_ASTVISITOR_H\n";
|
|
||||||
|
|
||||||
closeAndPrintFilePath(file);
|
closeAndPrintFilePath(file);
|
||||||
}
|
}
|
||||||
@@ -1339,8 +1336,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
QTextStream out(&file);
|
QTextStream out(&file);
|
||||||
out << copyrightHeader <<
|
out << copyrightHeader <<
|
||||||
"\n"
|
"\n"
|
||||||
"#ifndef ASTMATCHER_H\n"
|
"#pragma once\n"
|
||||||
"#define ASTMATCHER_H\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"#include \"ASTfwd.h\"\n"
|
"#include \"ASTfwd.h\"\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -1360,9 +1356,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
out <<
|
out <<
|
||||||
"};\n"
|
"};\n"
|
||||||
"\n"
|
"\n"
|
||||||
"} // namespace CPlusPlus\n"
|
"} // namespace CPlusPlus\n";
|
||||||
"\n"
|
|
||||||
"#endif // CPLUSPLUS_ASTMATCHER_H\n";
|
|
||||||
|
|
||||||
closeAndPrintFilePath(file);
|
closeAndPrintFilePath(file);
|
||||||
}
|
}
|
||||||
@@ -1574,8 +1568,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
|
|||||||
out
|
out
|
||||||
<< copyrightHeader
|
<< copyrightHeader
|
||||||
<< generatedHeader
|
<< generatedHeader
|
||||||
<< "#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
|
<< "#pragma once" << endl
|
||||||
<< "#define CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
|
|
||||||
<< endl
|
<< endl
|
||||||
<< "#include \"CPlusPlusForwardDeclarations.h\"" << endl
|
<< "#include \"CPlusPlusForwardDeclarations.h\"" << endl
|
||||||
<< "#include \"AST.h\"" << endl
|
<< "#include \"AST.h\"" << endl
|
||||||
@@ -1683,9 +1676,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
|
|||||||
out
|
out
|
||||||
<< "};" << endl
|
<< "};" << endl
|
||||||
<< endl
|
<< endl
|
||||||
<< "} // end of namespace CPlusPlus" << endl
|
<< "} // end of namespace CPlusPlus" << endl;
|
||||||
<< endl
|
|
||||||
<< "#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl;
|
|
||||||
|
|
||||||
closeAndPrintFilePath(file);
|
closeAndPrintFilePath(file);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user