Skip to content

Fix handling of temporaries in equivalent expression sets #828

Open
@secure-sw-dev-bot

Description

@secure-sw-dev-bot

This issue was copied from checkedc/checkedc-clang#832


The way that equality with temporary binding expressions is currently recorded can lead to false equality information. For example, in:

array_ptr<int> a;
a = _Dynamic_bounds_cast<array_ptr<const int>>(a + 1, count(1));

The second assignment will record equality between BoundsValue(TemporaryBinding(a + 1)) and a. Replacing a with its original value of a - 1 does not affect the BoundsValue expression, since the RecursiveASTVisitor class that does the replacement does not visit children of BoundsValue expressions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions