diff options
| author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-03-22 21:54:48 +0000 |
|---|---|---|
| committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-03-22 21:54:48 +0000 |
| commit | b9d3d30e226c9b3c436fefcc2b2f8e94f67f7bfc (patch) | |
| tree | 52643fe22f522c534365ddd6e0df1e49422e83e4 /clang/test/Analysis/lifetime-extension.cpp | |
| parent | 17ff975eb1b589e4793cb0544c8e91e5c2407150 (diff) | |
| download | bcm5719-llvm-b9d3d30e226c9b3c436fefcc2b2f8e94f67f7bfc.tar.gz bcm5719-llvm-b9d3d30e226c9b3c436fefcc2b2f8e94f67f7bfc.zip | |
[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
Diffstat (limited to 'clang/test/Analysis/lifetime-extension.cpp')
| -rw-r--r-- | clang/test/Analysis/lifetime-extension.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Analysis/lifetime-extension.cpp b/clang/test/Analysis/lifetime-extension.cpp index 52d5f9afc42..c9038a2b5bb 100644 --- a/clang/test/Analysis/lifetime-extension.cpp +++ b/clang/test/Analysis/lifetime-extension.cpp @@ -1,7 +1,11 @@ // RUN: %clang_analyze_cc1 -Wno-unused -std=c++11 -analyzer-checker=core,debug.ExprInspection -analyzer-config cfg-temporary-dtors=false -verify %s // RUN: %clang_analyze_cc1 -Wno-unused -std=c++11 -analyzer-checker=core,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true,c++-temp-dtor-inlining=true -DTEMPORARIES -verify %s +// RUN: %clang_analyze_cc1 -Wno-unused -std=c++17 -analyzer-checker=core,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true,c++-temp-dtor-inlining=true -DTEMPORARIES %s // RUN: %clang_analyze_cc1 -Wno-unused -std=c++11 -analyzer-checker=core,debug.ExprInspection -analyzer-config cfg-temporary-dtors=false -DMOVES -verify %s // RUN: %clang_analyze_cc1 -Wno-unused -std=c++11 -analyzer-checker=core,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true,c++-temp-dtor-inlining=true -DTEMPORARIES -DMOVES -verify %s +// RUN: %clang_analyze_cc1 -Wno-unused -std=c++17 -analyzer-checker=core,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true,c++-temp-dtor-inlining=true -DTEMPORARIES -DMOVES %s + +// Note: The C++17 run-lines don't -verify yet - it is a no-crash test. void clang_analyzer_eval(bool); void clang_analyzer_checkInlined(bool); |

