aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-04-04 03:20:02 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-05-19 13:35:28 +0200
commit73d53c98dea2b5e1f972d8cadcf4e0f75bed30e4 (patch)
tree593a8b6d40c1d004b7195ebef8cf46fe5d0c9b51 /lib.c
parent4605e11d7eed1a94e3c802081e58d1e45c707f82 (diff)
downloadsparse-dev-73d53c98dea2b5e1f972d8cadcf4e0f75bed30e4.tar.gz
let -dD report macro definitions
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 4a94b015..d02025a6 100644
--- a/lib.c
+++ b/lib.c
@@ -1100,9 +1100,14 @@ void create_builtin_stream(void)
static struct symbol_list *sparse_tokenstream(struct token *token)
{
+ int builtin = token && !token->pos.stream;
+
// Preprocess the stream
token = preprocess(token);
+ if (dump_macro_defs && !builtin)
+ dump_macro_definitions();
+
if (preprocess_only) {
while (!eof_token(token)) {
int prec = 1;