Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang][dataflow] Fix an issue with Environment::getResultObjectLocation(). #75483

Merged
merged 4 commits into from
Dec 18, 2023

Commits on Dec 14, 2023

  1. [clang][dataflow] Fix an issue with `Environment::getResultObjectLoca…

    …tion()`.
    
    So far, if there was a chain of record type prvalues,
    `getResultObjectLocation()` would assign a different result object location to
    each one. This makes no sense, of course, as all of these prvalues end up
    initializing the same result object.
    
    This patch fixes this by propagating storage locations up through the entire
    chain of prvalues.
    
    The new implementation also has the desirable effect of making it possible to
    make `getResultObjectLocation()` const, which seems appropriate given that,
    logically, it is just an accessor.
    martinboehme committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    3262b00 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. In refreshRecordValue(), associate the new RecordValue with the e…

    …xisting storage location.
    
    Without this, llvm#75483 started making tests for an internal analysis fail because
    of the following. The framework now generates `RecordValue`s for all `CallExpr`s
    that are pravlues of record type; the analysis was also calling
    `refreshRecordValue()` for those `CallExpr`s, but some parts of the analysis
    were still using the old `RecordValue` because the entry in `LocToVal` had not
    been updated.
    martinboehme committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    c366e66 View commit details
    Browse the repository at this point in the history
  2. Expand a comment

    martinboehme committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    ae82e05 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4497aa2 View commit details
    Browse the repository at this point in the history