+2020-02-03 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/93546
+ * region-model.cc (region_model::on_call_pre): Update for new
+ param of symbolic_region ctor.
+ (region_model::deref_rvalue): Likewise.
+ (region_model::add_new_malloc_region): Likewise.
+ (make_region_for_type): Likewise, preserving type.
+ * region-model.h (symbolic_region::symbolic_region): Add "type"
+ param and pass it to base class ctor.
+
2020-02-03 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93547
{
region_id frame_rid = get_current_frame_id ();
region_id new_rid
- = add_region (new symbolic_region (frame_rid, false));
+ = add_region (new symbolic_region (frame_rid, NULL_TREE, false));
if (!lhs_rid.null_p ())
{
svalue_id ptr_sid
We don't know if it on the heap, stack, or a global,
so use the root region as parent. */
region_id new_rid
- = add_region (new symbolic_region (m_root_rid, false));
+ = add_region (new symbolic_region (m_root_rid, NULL_TREE, false));
/* We need to write the region back into the pointer,
or we'll get a new, different region each time.
{
region_id heap_rid
= get_root_region ()->ensure_heap_region (this);
- return add_region (new symbolic_region (heap_rid, true));
+ return add_region (new symbolic_region (heap_rid, NULL_TREE, true));
}
/* Attempt to return a tree that represents SID, or return NULL_TREE.
/* If we have a void *, make a new symbolic region. */
if (VOID_TYPE_P (type))
- return new symbolic_region (parent_rid, false);
+ return new symbolic_region (parent_rid, type, false);
gcc_unreachable ();
}
class symbolic_region : public region
{
public:
- symbolic_region (region_id parent_rid, bool possibly_null)
- : region (parent_rid, svalue_id::null (), NULL_TREE),
+ symbolic_region (region_id parent_rid, tree type, bool possibly_null)
+ : region (parent_rid, svalue_id::null (), type),
m_possibly_null (possibly_null)
{}
symbolic_region (const symbolic_region &other);