projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81cec36
)
make parser more robust against invalid declarations
author
Matthias Braun
<matze@braunis.de>
Fri, 30 May 2008 08:57:39 +0000
(08:57 +0000)
committer
Matthias Braun
<matze@braunis.de>
Fri, 30 May 2008 08:57:39 +0000
(08:57 +0000)
[r19829]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
28b6d2c
..
cb06856
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-3692,6
+3692,7
@@
static declaration_t *parse_declarator(
if(construct_type != NULL) {
obstack_free(&temp_obst, construct_type);
+ declaration->valid = true;
}
return declaration;
@@
-3788,6
+3789,9
@@
static declaration_t *internal_record_declaration(
const symbol_t *const symbol = declaration->symbol;
const namespace_t namespc = (namespace_t)declaration->namespc;
+ if (!declaration->valid)
+ return declaration;
+
type_t *const orig_type = declaration->type;
type_t *const type = skip_typeref(orig_type);
if (is_type_function(type) &&