aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/svalue.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/svalue.h')
-rw-r--r--gcc/analyzer/svalue.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/analyzer/svalue.h b/gcc/analyzer/svalue.h
index bf9e12b..7a27cb6 100644
--- a/gcc/analyzer/svalue.h
+++ b/gcc/analyzer/svalue.h
@@ -188,6 +188,8 @@ public:
const region_model &model,
const svalue *outer_sval = nullptr) const;
+ tree maybe_get_type_from_typeinfo () const;
+
protected:
svalue (complexity c, symbol::id_t id, tree type)
: symbol (c, id), m_type (type)
@@ -421,19 +423,19 @@ public:
/* An enum describing a particular kind of "poisoned" value. */
-enum poison_kind
+enum class poison_kind
{
/* For use to describe uninitialized memory. */
- POISON_KIND_UNINIT,
+ uninit,
/* For use to describe freed memory. */
- POISON_KIND_FREED,
+ freed,
/* For use to describe deleted memory. */
- POISON_KIND_DELETED,
+ deleted,
/* For use on pointers to regions within popped stack frames. */
- POISON_KIND_POPPED_STACK
+ popped_stack
};
extern const char *poison_kind_to_str (enum poison_kind);
@@ -454,7 +456,7 @@ public:
hashval_t hash () const
{
inchash::hash hstate;
- hstate.add_int (m_kind);
+ hstate.add_int (static_cast<int> (m_kind));
hstate.add_ptr (m_type);
return hstate.end ();
}
@@ -528,8 +530,8 @@ namespace ana {
struct setjmp_record
{
setjmp_record (const exploded_node *enode,
- const gcall *setjmp_call)
- : m_enode (enode), m_setjmp_call (setjmp_call)
+ const gcall &setjmp_call)
+ : m_enode (enode), m_setjmp_call (&setjmp_call)
{
}
@@ -549,6 +551,7 @@ struct setjmp_record
const exploded_node *m_enode;
const gcall *m_setjmp_call;
+ // non-null, but we can't use a reference since we're putting these in a hash_map
};
/* Concrete subclass of svalue representing buffers for setjmp/sigsetjmp,