diff options
| author | Marcin Swiderski <marcin.sfider@gmail.com> | 2010-10-25 07:00:40 +0000 |
|---|---|---|
| committer | Marcin Swiderski <marcin.sfider@gmail.com> | 2010-10-25 07:00:40 +0000 |
| commit | 52e4bc1fede9b96bf6caec8fe6138e675ea14146 (patch) | |
| tree | 0af2c9d3101b5cbce8a601ac4cb65de113c20b89 /clang/test/Analysis | |
| parent | a242417a90973f2a98cbf5b64681754d47809d30 (diff) | |
| download | bcm5719-llvm-52e4bc1fede9b96bf6caec8fe6138e675ea14146.tar.gz bcm5719-llvm-52e4bc1fede9b96bf6caec8fe6138e675ea14146.zip | |
Added generation of destructors for constant size arrays.
There's only one destructor call generated for each not empty array (at least for now this should be enough).
llvm-svn: 117251
Diffstat (limited to 'clang/test/Analysis')
| -rw-r--r-- | clang/test/Analysis/auto-obj-dtors-cfg-output.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp index 8a6c55b60be..129a0c2616e 100644 --- a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp +++ b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp @@ -16,6 +16,11 @@ void test_const_ref() { const A& c = A(); } +void test_array() { + A a[2]; + A b[0]; +} + void test_scope() { A a; { A c; @@ -165,6 +170,18 @@ void test_catch_copy() { // CHECK: Predecessors (1): B1 // CHECK: Successors (0): // CHECK: [ B2 (ENTRY) ] +// CHECK: Predecessors (0): +// CHECK: Successors (1): B1 +// CHECK: [ B1 ] +// CHECK: 1: A a[2]; +// CHECK: 2: A b[0]; +// CHECK: 3: [B1.1].~A() (Implicit destructor) +// CHECK: Predecessors (1): B2 +// CHECK: Successors (1): B0 +// CHECK: [ B0 (EXIT) ] +// CHECK: Predecessors (1): B1 +// CHECK: Successors (0): +// CHECK: [ B2 (ENTRY) ] // CHECK: Predecessors (0): // CHECK: Successors (1): B1 // CHECK: [ B1 ] |

