diff options
author | martinboehme <mboehme@google.com> | 2024-04-10 20:03:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 20:03:35 +0200 |
commit | 21009f466ece9f21b18e1bb03bd74b566188bae5 (patch) | |
tree | 12a782d2a28a14b6479deceab20022bec8d1658d /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4d80dff819d1164775d0d55fc68bffedb90ba53c (diff) | |
download | llvm-21009f466ece9f21b18e1bb03bd74b566188bae5.zip llvm-21009f466ece9f21b18e1bb03bd74b566188bae5.tar.gz llvm-21009f466ece9f21b18e1bb03bd74b566188bae5.tar.bz2 |
[clang][dataflow] Propagate locations from result objects to initializers. (#87320)
Previously, we were propagating storage locations the other way around,
i.e.
from initializers to result objects, using `RecordValue::getLoc()`. This
gave
the wrong behavior in some cases -- see the newly added or fixed tests
in this
patch.
In addition, this patch now unblocks removing the `RecordValue` class
entirely,
as we no longer need `RecordValue::getLoc()`.
With this patch, the test `TransferTest.DifferentReferenceLocInJoin`
started to
fail because the framework now always uses the same storge location for
a
`MaterializeTemporaryExpr`, meaning that the code under test no longer
set up
the desired state where a variable of reference type is mapped to two
different
storage locations in environments being joined. Rather than trying to
modify
this test to set up the test condition again, I have chosen to replace
the test
with an equivalent test in DataflowEnvironmentTest.cpp that sets up the
test
condition directly; because this test is more direct, it will also be
less
brittle in the face of future changes.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions