projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5c4001
)
Consistently use PUSH_PARENT()/POP_PARENT().
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 29 Jun 2011 07:18:27 +0000
(09:18 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 29 Jun 2011 07:18:27 +0000
(09:18 +0200)
This corrects having the wrong parent after parsing an inner function.
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
f9220f0
..
2bbdbf4
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-5491,7
+5491,7
@@
static void parse_external_declaration(void)
entity_t *old_current_entity = current_entity;
current_function = function;
current_entity = entity;
-
current_parent = NULL
;
+
PUSH_PARENT(NULL)
;
goto_first = NULL;
goto_anchor = &goto_first;
@@
-5517,7
+5517,7
@@
static void parse_external_declaration(void)
}
}
-
assert(current_parent == NULL
);
+
POP_PARENT(
);
assert(current_function == function);
assert(current_entity == entity);
current_entity = old_current_entity;