aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-10-13 10:03:02 -0700
committerRichard Smith <richard@metafoo.co.uk>2020-10-14 17:43:51 -0700
commitf7f2e4261a98b2da519d58e7f6794b013cda7a4b (patch)
treea32d133a7c57aba7d36b62ad9406232cca1a4c8c /clang/lib/Basic/SourceLocation.cpp
parent94c18d91d24355ba7274c4f40f3e8754a5f72c41 (diff)
downloadllvm-f7f2e4261a98b2da519d58e7f6794b013cda7a4b.zip
llvm-f7f2e4261a98b2da519d58e7f6794b013cda7a4b.tar.gz
llvm-f7f2e4261a98b2da519d58e7f6794b013cda7a4b.tar.bz2
PR47805: Use a single object for a function parameter in the caller and
callee in constant evaluation. We previously made a deep copy of function parameters of class type when passing them, resulting in the destructor for the parameter applying to the original argument value, ignoring any modifications made in the function body. This also meant that the 'this' pointer of the function parameter could be observed changing between the caller and the callee. This change completely reimplements how we model function parameters during constant evaluation. We now model them roughly as if they were variables living in the caller, albeit with an artificially reduced scope that covers only the duration of the function call, instead of modeling them as temporaries in the caller that we partially "reparent" into the callee at the point of the call. This brings some minor diagnostic improvements, as well as significantly reduced stack usage during constant evaluation.
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
0 files changed, 0 insertions, 0 deletions