forked from qt-creator/qt-creator
CPlusPlus: Block function-like macro name for arguments expansion
Arguments of funstion-like macro may contain the name of this macro. The attempt to expand it results into infinite recursion. Patch solves that by saving the macro name until the arguments are collected to determine that it should not be expanded. Fixes: QTCREATORBUG-21642 Change-Id: Iafb404ecd3959a2f1011c12c1c3f1c0c54ed3547 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This commit is contained in:
committed by
Erik Verbruggen
parent
66dc5e9713
commit
645bbf5dd6
@@ -220,7 +220,8 @@ private:
|
||||
|
||||
bool scanComment(PPToken *tk);
|
||||
bool consumeComments(PPToken *tk);
|
||||
bool collectActualArguments(PPToken *tk, QVector<QVector<PPToken> > *actuals);
|
||||
bool collectActualArguments(PPToken *tk, QVector<QVector<PPToken> > *actuals,
|
||||
const QByteArray &parentMacroName);
|
||||
void scanActualArgument(PPToken *tk, QVector<PPToken> *tokens);
|
||||
|
||||
void handlePreprocessorDirective(PPToken *tk);
|
||||
|
||||
Reference in New Issue
Block a user