From: Anders Carlsson Date: Sat, 15 Aug 2009 22:30:50 +0000 (+0000) Subject: Add a simple test for temporaries. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a039eb88d03b35311cb2c99f84eb76634f37a71;p=clang 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 0000000000..11b83d333b --- /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(); +}