[analyzer] Remove an assertion that doesn't hold in C++17.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 22 Mar 2018 21:54:48 +0000 (21:54 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 22 Mar 2018 21:54:48 +0000 (21:54 +0000)
commitb9d3d30e226c9b3c436fefcc2b2f8e94f67f7bfc
tree52643fe22f522c534365ddd6e0df1e49422e83e4
parent17ff975eb1b589e4793cb0544c8e91e5c2407150
[analyzer] Remove an assertion that doesn't hold in C++17.

Function return values can be constructed directly in variables or passed
directly into return statements, without even an elidable copy in between.
This is how the C++17 mandatory copy elision AST behaves. The behavior we'll
have in such cases is the "old" behavior that we've had before we've
implemented destructor inlining and proper lifetime extension support.

Differential Revision: https://reviews.llvm.org/D44755

llvm-svn: 328253
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/test/Analysis/lifetime-extension.cpp
clang/test/Analysis/temporaries.cpp