summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/temporaries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/temporaries.cpp')
-rw-r--r--clang/test/Analysis/temporaries.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Analysis/temporaries.cpp b/clang/test/Analysis/temporaries.cpp
index 49cf070177f..cc39201b0c3 100644
--- a/clang/test/Analysis/temporaries.cpp
+++ b/clang/test/Analysis/temporaries.cpp
@@ -493,3 +493,13 @@ namespace PR16629 {
clang_analyzer_eval(x == 47); // expected-warning{{TRUE}}
}
}
+
+namespace PR32088 {
+ void testReturnFromStmtExprInitializer() {
+ // We shouldn't try to destroy the object pointed to by `obj' upon return.
+ const NonTrivial &obj = ({
+ return; // no-crash
+ NonTrivial(42);
+ });
+ }
+}
OpenPOWER on IntegriCloud