From d413f4ce26a374a7c39201626c0e444788b62384 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 13 May 2020 14:57:29 -0400 Subject: [PATCH 127/179] FIXME: tweaks to comments --- gcc/analyzer/region-model2.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/analyzer/region-model2.h b/gcc/analyzer/region-model2.h index ff66be580ee..e9eadaa3830 100644 --- a/gcc/analyzer/region-model2.h +++ b/gcc/analyzer/region-model2.h @@ -124,13 +124,16 @@ struct purge_stats2 The class hierarchy looks like this (using indentation to show inheritance, and with kinds shown for the concrete subclasses): -FIXME: needs overhauling: svalue2 - region_svalue2 (SK_REGION) - constant_svalue2 (SK_CONSTANT) + region_svalue2 (SK_REGION): a pointer to a region2 + constant_svalue2 (SK_CONSTANT): a constant unknown_svalue2 (SK_UNKNOWN) - poisoned_svalue2 (SK_POISONED) - setjmp_svalue2 (SK_SETJMP). */ + poisoned_svalue2 (SK_POISONED): a unusable value (undefined) + setjmp_svalue2 (SK_SETJMP): a setjmp/longjmp buffer + initial2_svalue2 (SK_INITIAL): the initial value of a region2 + unaryop_svalue2 (SK_UNARYOP): unary operation on another svalue2 + binop_svalue2 (SK_BINOP): binary operation on two svalue2s + sub_svalue2 (SK_SUB): the result of accessing a subregion. */ /* An abstract base class representing a value held by a region of memory. */ @@ -804,6 +807,7 @@ namespace ana { within the frames and the "globals" region. Regions for structs can have subregions for fields. + FIXME: A region can optionally have a value, or inherit its value from the first ancestor with a value. For example, the stack region has a "uninitialized" poison value which is inherited by all -- 2.21.0