Add a simple test for temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79147 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/temp-1.cpp b/test/CodeGenCXX/temp-1.cpp
new file mode 100644
index 0000000..11b83d3
--- /dev/null
+++ b/test/CodeGenCXX/temp-1.cpp
@@ -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();
+}