summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-12-19 23:14:06 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-12-19 23:14:06 +0000
commit179064983aa73dd32c3004eac82af220147962e3 (patch)
tree2e89ee82f7456700e921584bcfdc61fb801b9191 /lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
parent217b3b20d8d2be1781dcd8a0d058f6d111922d53 (diff)
downloadbcm5719-llvm-179064983aa73dd32c3004eac82af220147962e3.tar.gz
bcm5719-llvm-179064983aa73dd32c3004eac82af220147962e3.zip
[analyzer] Improve modeling for returning an object from the top frame with RVO.
Static Analyzer processes the program function-by-function, sometimes diving into other functions ("inlining" them). When an object is returned from an inlined function, Return Value Optimization is modeled, and the returned object is constructed at its return location directly. When an object is returned from the function from which the analysis has started (the top stack frame of the analysis), the return location is unknown. Model it with a SymbolicRegion based on a conjured symbol that is specifically tagged for that purpose, because this is generally the correct way to symbolicate unknown locations in Static Analyzer. Fixes leak false positives when an object is returned from top frame in C++17: objects that are put into a SymbolicRegion-based memory region automatically "escape" and no longer get reported as leaks. This only applies to C++17 return values with destructors, because it produces a redundant CXXBindTemporaryExpr in the call site, which confuses our liveness analysis. The actual fix for liveness analysis is still pending, but it is no longer causing problems. Additionally, re-enable temporary destructor tests in C++17. Differential Revision: https://reviews.llvm.org/D55804 rdar://problem/46217550 llvm-svn: 349696
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud