summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/PreprocessorClient.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2009-09-25 16:00:14 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2009-09-25 16:08:01 +0200
commit22ed0255b97ff52d808ebd93fabe06e214b56d2d (patch)
tree40dc79d131d6b13a8360ff8e68e7ab6119557d1f /src/libs/cplusplus/PreprocessorClient.cpp
parent90470771fd58722a6a82b3da28bfaa645b250216 (diff)
downloadqt-creator-22ed0255b97ff52d808ebd93fabe06e214b56d2d.tar.gz
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>
Diffstat (limited to 'src/libs/cplusplus/PreprocessorClient.cpp')
-rw-r--r--src/libs/cplusplus/PreprocessorClient.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/libs/cplusplus/PreprocessorClient.cpp b/src/libs/cplusplus/PreprocessorClient.cpp
index 6fe1b2a75b..5b57baa7b2 100644
--- a/src/libs/cplusplus/PreprocessorClient.cpp
+++ b/src/libs/cplusplus/PreprocessorClient.cpp
@@ -31,6 +31,44 @@
using namespace CPlusPlus;
+/*!
+ \class Client
+ \brief A notification interface for for C++ preprocessor.
+*/
+
+/*!
+ \fn void Client::macroAdded(const Macro &macro)
+
+ Called whenever a new macro is defined.
+*/
+
+/*!
+ \fn void Client::passedMacroDefinitionCheck(unsigned offset, const Macro &macro)
+
+ Called when the preprocessor checks whether a macro is defined or not and the
+ result is positive.
+
+ \sa failedMacroDefinitionCheck()
+*/
+
+/*!
+ \fn void Client::failedMacroDefinitionCheck(unsigned offset, const QByteArray &name)
+
+ Called when the preprocessor checks whether a macro is defined or not and the
+ result is negative.
+
+ \sa passedMacroDefinitionCheck()
+*/
+
+/*!
+ \fn void Client::startExpandingMacro(unsigned offset, const Macro &macro, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>())
+
+ Called when starting to expand a macro. The parameter \a inCondition indicates whether the
+ expansion is happening inside a preprocessor conditional.
+
+ \sa stopExpandingMacro()
+*/
+
Client::Client()
{ }