aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-06 10:22:52 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-10 13:53:57 +0100
commitc2bf4dc16bece957f6e8d044121477d69069df3d (patch)
tree15772636d8d6b5ed291f1ddd101e67350c8ba867
parentb5e4b66490d507f5a4631800d4f2d378167389cd (diff)
downloadsparse-c2bf4dc16bece957f6e8d044121477d69069df3d.tar.gz
typeof: fix up comment in examine_pointer_type()
The comment was added in commit c72032ad3 ("Add comment on what ...") and explain why the size is set before recursing into the object pointed to. But since commit 017034ed4 ("Fix up type examination.") the object is no more examined. Adjust the comment to remove posible confusion. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--symbol.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/symbol.c b/symbol.c
index 72ea2e4e..334f9df2 100644
--- a/symbol.c
+++ b/symbol.c
@@ -436,10 +436,11 @@ static struct symbol *examine_enum_type(struct symbol *sym)
static struct symbol *examine_pointer_type(struct symbol *sym)
{
/*
- * We need to set the pointer size first, and
- * examine the thing we point to only afterwards.
- * That's because this pointer type may end up
- * being needed for the base type size evaluation.
+ * Since pointers to incomplete types can be used,
+ * for example in a struct-declaration-list,
+ * the base type must *not* be examined here.
+ * It thus means that it needs to be done later,
+ * when the base type of the pointer is looked at.
*/
if (!sym->bit_size)
sym->bit_size = bits_in_pointer;