diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-14 15:23:50 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-14 15:23:50 +0000 |
| commit | fee455fcf5993787c4366998dbfb5bd228441daa (patch) | |
| tree | 6c7e091feb4d305b726e86cd0f40efd42ae3f42f /clang/test/Analysis/temp-obj-dtors-cfg-output.cpp | |
| parent | 4581ddc123deac8c5a6f586be77c6fbd50e86597 (diff) | |
| download | bcm5719-llvm-fee455fcf5993787c4366998dbfb5bd228441daa.tar.gz bcm5719-llvm-fee455fcf5993787c4366998dbfb5bd228441daa.zip | |
Revert r118991.
Elidable CXXConstructExpr should inhibit calling destructor for temporary
that is copied, not the one created. This is because eliding copy constructor
means that the object that was to be copied will be constructed directly in
memory the copy would be constructed in.
llvm-svn: 119044
Diffstat (limited to 'clang/test/Analysis/temp-obj-dtors-cfg-output.cpp')
| -rw-r--r-- | clang/test/Analysis/temp-obj-dtors-cfg-output.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp b/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp index adf509be5b5..594c91b595d 100644 --- a/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp +++ b/clang/test/Analysis/temp-obj-dtors-cfg-output.cpp @@ -264,11 +264,14 @@ TestCtorInits::TestCtorInits() // CHECK: Successors (2): B3 B2 // CHECK: [ B5 ] // CHECK: 1: ~A() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) // CHECK: Predecessors (1): B7 // CHECK: Successors (1): B4 // CHECK: [ B6 ] // CHECK: 1: ~A() (Temporary object destructor) -// CHECK: 2: ~B() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) +// CHECK: 3: ~A() (Temporary object destructor) +// CHECK: 4: ~B() (Temporary object destructor) // CHECK: Predecessors (1): B7 // CHECK: Successors (1): B4 // CHECK: [ B7 ] @@ -308,11 +311,14 @@ TestCtorInits::TestCtorInits() // CHECK: Successors (1): B0 // CHECK: [ B2 ] // CHECK: 1: ~A() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) // CHECK: Predecessors (1): B4 // CHECK: Successors (1): B1 // CHECK: [ B3 ] // CHECK: 1: ~A() (Temporary object destructor) -// CHECK: 2: ~B() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) +// CHECK: 3: ~A() (Temporary object destructor) +// CHECK: 4: ~B() (Temporary object destructor) // CHECK: Predecessors (1): B4 // CHECK: Successors (1): B1 // CHECK: [ B4 ] @@ -345,7 +351,8 @@ TestCtorInits::TestCtorInits() // CHECK: Successors (1): B7 // CHECK: [ B9 ] // CHECK: 1: ~A() (Temporary object destructor) -// CHECK: 2: ~B() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) +// CHECK: 3: ~B() (Temporary object destructor) // CHECK: Predecessors (1): B10 // CHECK: Successors (1): B7 // CHECK: [ B10 ] @@ -385,6 +392,7 @@ TestCtorInits::TestCtorInits() // CHECK: Successors (1): B0 // CHECK: [ B2 ] // CHECK: 1: ~A() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) // CHECK: Predecessors (1): B3 // CHECK: Successors (1): B1 // CHECK: [ B3 ] @@ -418,6 +426,7 @@ TestCtorInits::TestCtorInits() // CHECK: Successors (1): B0 // CHECK: [ B2 ] // CHECK: 1: ~A() (Temporary object destructor) +// CHECK: 2: ~A() (Temporary object destructor) // CHECK: Predecessors (1): B3 // CHECK: Successors (1): B1 // CHECK: [ B3 ] |

