]> granicus.if.org Git - clang/commitdiff
Add a simple test for temporaries.
authorAnders Carlsson <andersca@mac.com>
Sat, 15 Aug 2009 22:30:50 +0000 (22:30 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 15 Aug 2009 22:30:50 +0000 (22:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79147 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/temp-1.cpp [new file with mode: 0644]

diff --git a/test/CodeGenCXX/temp-1.cpp b/test/CodeGenCXX/temp-1.cpp
new file mode 100644 (file)
index 0000000..11b83d3
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 && 
+struct A {
+  A();
+  ~A();
+  void f();
+};
+
+void f() {
+  // RUN: grep "call void @_ZN1AC1Ev" %t | count 2 &&
+  // RUN: grep "call void @_ZN1AD1Ev" %t | count 2
+  A();
+  A().f();
+}