[llvm-commits] 	CVS: llvm-test/SingleSource/Regression/C++/short_circuit_dtor.cpp
    Chris Lattner 
    lattner at cs.uiuc.edu
       
    Mon Feb 14 22:58:57 PST 2005
    
    
  
Changes in directory llvm-test/SingleSource/Regression/C++:
short_circuit_dtor.cpp added (r1.1)
---
Log message:
new testcase for PR513: http://llvm.cs.uiuc.edu/PR513 
---
Diffs of the changes:  (+14 -0)
 short_circuit_dtor.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+)
Index: llvm-test/SingleSource/Regression/C++/short_circuit_dtor.cpp
diff -c /dev/null llvm-test/SingleSource/Regression/C++/short_circuit_dtor.cpp:1.1
*** /dev/null	Tue Feb 15 00:58:52 2005
--- llvm-test/SingleSource/Regression/C++/short_circuit_dtor.cpp	Tue Feb 15 00:58:42 2005
***************
*** 0 ****
--- 1,14 ----
+ #include <stdio.h>
+ 
+ struct X {
+   int Val;
+   X(int i) : Val(i) { printf("X::X(%d)\n", Val); }
+   ~X() { printf("X::~X(%d)\n", Val); }
+ };
+ 
+ bool foo(const X &) { return true; }
+ void bar() {}
+ int main() {
+   if ((foo(1) || foo(2)))
+     bar();
+ }
    
    
More information about the llvm-commits
mailing list