Track more macro uses.

In particular macros that are only checked for definition or are
expanded during the evaluation of an #if or #elif directive are now also
added to the list available through Document::macroUses().

The names of undefined macros that are interesting (because they're used
in an #ifdef or a defined(...)) are now available through
Document::undefinedMacroUses().

Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2009-09-25 16:00:14 +02:00
parent 90470771fd
commit 22ed0255b9
9 changed files with 215 additions and 19 deletions

View File

@@ -58,9 +58,13 @@ public:
virtual void macroAdded(const Macro &) {}
virtual void passedMacroDefinitionCheck(unsigned, const Macro &) {}
virtual void failedMacroDefinitionCheck(unsigned, const QByteArray &) {}
virtual void startExpandingMacro(unsigned,
const Macro &,
const QByteArray &,
bool,
const QVector<MacroArgumentReference> &) {}
virtual void stopExpandingMacro(unsigned, const Macro &) {}