[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-commits
Subject:    [llvm-commits] CVS: llvm/test/Regression/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp
From:       Chris Lattner <lattner () cs ! uiuc ! edu>
Date:       2003-11-29 3:12:15
Message-ID: 200311290911.DAA13924 () zion ! cs ! uiuc ! edu
[Download RAW message or body]


Changes in directory llvm/test/Regression/C++Frontend:

2003-11-29-DuplicatedCleanupTest.cpp added (r1.1)

---
Log message:

Testcase for duplicated cleanup work (PR11).  Note that this testcase is not actually
tested automatically, so it is practically useless.  However, it seemed silly to throw
away my testcase, so here it is.


---
Diffs of the changes:  (+39 -0)

Index: llvm/test/Regression/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp
diff -c /dev/null llvm/test/Regression/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp:1.1
*** /dev/null	Sat Nov 29 03:11:01 2003
--- llvm/test/Regression/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp	Sat Nov 29 03:10:50 2003
***************
*** 0 ****
--- 1,39 ----
+ 
+ void doesntThrow() throw();
+ struct F {
+   ~F() { doesntThrow(); }
+ };
+ 
+ void atest() {
+   F A;
+ lab:
+   F B;
+   goto lab;
+ }
+ 
+ void test(int val) {
+ label: {
+    F A;
+    F B;
+    if (val == 0) goto label;
+    if (val == 1) goto label;
+ }
+ }
+ 
+ void test3(int val) {
+ label: {
+    F A;
+    F B;
+    if (val == 0) { doesntThrow(); goto label; }
+    if (val == 1) { doesntThrow(); goto label; }
+ }
+ }
+ 
+ void test4(int val) {
+ label: {
+    F A;
+    F B;
+    if (val == 0) { F C; goto label; }
+    if (val == 1) { F D; goto label; }
+ }
+ }



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic