summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-06-28 00:18:52 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-06-28 00:18:52 +0000
commitd18639bd13e354f224ca49038cb6519dac222cd7 (patch)
tree722663fd2bcef67b5da1915b6ea03d4b7c21f35b /clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
parent98f5475f4402b23efecc8c88f8105d1d25e27c66 (diff)
downloadbcm5719-llvm-d18639bd13e354f224ca49038cb6519dac222cd7.tar.gz
bcm5719-llvm-d18639bd13e354f224ca49038cb6519dac222cd7.zip
[CFG] [analyzer] Simplify lifetime-extended temporary construction contexts.
When a temporary object is materialized and through that obtain lifetime that is longer than the duration of the full-expression, it does not require a temporary object destructor; it will be destroyed in a different manner. Therefore it's not necessary to include CXXBindTemporaryExpr into the construction context for such temporary in the CFG only to make clients throw it away. Differential Revision: https://reviews.llvm.org/D47667 llvm-svn: 335798
Diffstat (limited to 'clang/test/Analysis/auto-obj-dtors-cfg-output.cpp')
-rw-r--r--clang/test/Analysis/auto-obj-dtors-cfg-output.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
index cd87d3c4430..7e678a1ec78 100644
--- a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+++ b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
@@ -56,7 +56,7 @@ extern const bool UV;
// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 5: const A &b = a;
// WARNINGS-NEXT: 6: A() (CXXConstructExpr, class A)
-// ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.7], [B1.9], class A)
+// ANALYZER-NEXT: 6: A() (CXXConstructExpr, [B1.9], class A)
// CHECK-NEXT: 7: [B1.6] (BindTemporary)
// CHECK-NEXT: 8: [B1.7] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 9: [B1.8]
@@ -78,7 +78,7 @@ void test_const_ref() {
// CHECK: [B1]
// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A)
// CXX98-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], class A)
-// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.3], class A)
+// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.3], class A)
// CHECK-NEXT: 2: [B1.1] (BindTemporary)
// CXX98-NEXT: 3: [B1.2].x
// CXX98-NEXT: 4: [B1.3]
@@ -102,7 +102,7 @@ void test_const_ref_to_field() {
// CHECK: [B1]
// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A)
// CXX98-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], class A)
-// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.3], class A)
+// CXX11-ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.3], class A)
// CHECK-NEXT: 2: [B1.1] (BindTemporary)
// CXX98-NEXT: 3: A::x
// CXX98-NEXT: 4: &[B1.3]
@@ -130,20 +130,20 @@ void test_pointer_to_member() {
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
// WARNINGS-NEXT: 1: A() (CXXConstructExpr, class A)
-// ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.2], [B1.4], class A)
+// ANALYZER-NEXT: 1: A() (CXXConstructExpr, [B1.4], class A)
// CHECK-NEXT: 2: [B1.1] (BindTemporary)
// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 4: [B1.3]
// CHECK-NEXT: 5: {[B1.4]}
// CHECK-NEXT: 6: B b = {A()};
// WARNINGS-NEXT: 7: A() (CXXConstructExpr, class A)
-// ANALYZER-NEXT: 7: A() (CXXConstructExpr, [B1.8], [B1.10], class A)
+// ANALYZER-NEXT: 7: A() (CXXConstructExpr, [B1.10], class A)
// CHECK-NEXT: 8: [B1.7] (BindTemporary)
// CHECK-NEXT: 9: [B1.8] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 10: [B1.9]
// CHECK-NEXT: 11: {[B1.10]}
// WARNINGS-NEXT: 12: A() (CXXConstructExpr, class A)
-// ANALYZER-NEXT: 12: A() (CXXConstructExpr, [B1.13], [B1.15], class A)
+// ANALYZER-NEXT: 12: A() (CXXConstructExpr, [B1.15], class A)
// CHECK-NEXT: 13: [B1.12] (BindTemporary)
// CHECK-NEXT: 14: [B1.13] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 15: [B1.14]
OpenPOWER on IntegriCloud