summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/preprocessor.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-11-22 11:03:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-23 17:04:00 +0100
commitaea68c93ae437a761584719f0f1ca93eaf6f7484 (patch)
tree09f7bb24a1ec26c96db27be9bfeb61ed6c3da8e4 /src/tools/moc/preprocessor.h
parent436e3dc4f961b4ea6c541d1fdf82e476ac10597c (diff)
Proper macro replacment and branch evaluation
Correclty replace macros according to the C++ standard. Use the correct replacement method also to evaluate With this moc correctly processes boost headers. Task-number: QTBUG-27546 Change-Id: I001b3054c5fcdc34d46cfa53d1387bd19436f361 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/moc/preprocessor.h')
-rw-r--r--src/tools/moc/preprocessor.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/moc/preprocessor.h b/src/tools/moc/preprocessor.h
index 0c099318db..df5d28f473 100644
--- a/src/tools/moc/preprocessor.h
+++ b/src/tools/moc/preprocessor.h
@@ -64,7 +64,6 @@ typedef QByteArray MacroName;
typedef SubArray MacroName;
#endif
typedef QHash<MacroName, Macro> Macros;
-typedef QVector<MacroName> MacroSafeSet;
class QIODevice;
@@ -84,10 +83,9 @@ public:
void skipUntilEndif();
bool skipBranch();
- void substituteMacro(const MacroName &macro, Symbols &substituted, MacroSafeSet safeset = MacroSafeSet());
- void substituteUntilNewline(Symbols &substituted, MacroSafeSet safeset = MacroSafeSet());
- void macroExpandIdentifier(int lineNum, Symbols &preprocessed, MacroSafeSet safeset = MacroSafeSet());
- void macroExpandSymbols(int lineNum, const Symbols &symbols, Symbols &expanded, MacroSafeSet safeset);
+ void substituteUntilNewline(Symbols &substituted);
+ static Symbols macroExpandIdentifier(Preprocessor *that, SymbolStack &symbols, int lineNum, QByteArray *macroName);
+ static Symbols macroExpand(Preprocessor *that, Symbols &toExpand, int &index, int lineNum, bool one);
int evaluateCondition();