forked from qt-creator/qt-creator
C++: fix Q_CREATOR_RUN macro handling
Moved it from the handleIfDefDirective to the pre-defined macros, so that #if defined() can also see it. Task-number: QTCREATORBUG-9322 Change-Id: Icbecad5c885dd2374b559969c99631c3ddc73844 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
ce4edd7930
commit
10725c086b
@@ -1900,8 +1900,6 @@ void Preprocessor::handleEndIfDirective(PPToken *tk, const PPToken £Token)
|
||||
|
||||
void Preprocessor::handleIfDefDirective(bool checkUndefined, PPToken *tk)
|
||||
{
|
||||
static const QByteArray qCreatorRun("Q_CREATOR_RUN");
|
||||
|
||||
lex(tk); // consume "ifdef" token
|
||||
if (tk->is(T_IDENTIFIER)) {
|
||||
if (checkUndefined && m_state.m_ifLevel == 0)
|
||||
@@ -1922,8 +1920,6 @@ void Preprocessor::handleIfDefDirective(bool checkUndefined, PPToken *tk)
|
||||
}
|
||||
} else if (m_env->isBuiltinMacro(macroName)) {
|
||||
value = true;
|
||||
} else if (macroName == qCreatorRun) {
|
||||
value = true;
|
||||
}
|
||||
|
||||
if (checkUndefined)
|
||||
|
||||
Reference in New Issue
Block a user