aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-06 10:10:05 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-10 13:54:56 +0100
commitefe42efcc1c774af69b15ac26f8c9144fbc00f08 (patch)
tree3214731acda935c57cc02e7176892f88216f2895
parent0544ea39ce67fed029b101251516e429a994a885 (diff)
downloadsparse-efe42efcc1c774af69b15ac26f8c9144fbc00f08.tar.gz
typeof: examine it at show-time
Unless an explicit call to examine_pointer_target() or get_base_type() is made, the base type of pointers are *not* examined via the usual recursive examine_symbol_type(). That means that it is possible to call show_typename() on a non-fully examined type which is wrong (for example, because SYM_TYPEOFs may not be converted). So, call examine_pointer_target() on pointers when trying to display them. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--show-parse.c1
-rw-r--r--validation/eval/typeof0.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/show-parse.c b/show-parse.c
index 37104167..80125e74 100644
--- a/show-parse.c
+++ b/show-parse.c
@@ -337,6 +337,7 @@ deeper:
mod = sym->ctype.modifiers;
as = sym->ctype.as;
was_ptr = 1;
+ examine_pointer_target(sym);
break;
case SYM_FN:
diff --git a/validation/eval/typeof0.c b/validation/eval/typeof0.c
index abef6386..12b08660 100644
--- a/validation/eval/typeof0.c
+++ b/validation/eval/typeof0.c
@@ -4,7 +4,6 @@ static typeof(i) *ptr;
/*
* check-name: eval-typeof0
* check-command: test-show-type $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: unknown type