diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-05 18:17:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-05 18:17:32 +0000 |
commit | caa499b50bd6d423d095b79aca857f1c57345a0a (patch) | |
tree | 8e41e8f02825795b8990851defe892404798fb9d /test/CodeGenCXX/default-arg-temps.cpp | |
parent | b2c352ed5586cf869a5dad87a528b9ac000d2fae (diff) |
Handle destruction of temporaries used in default argument
construction of constructor calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78222 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/default-arg-temps.cpp')
-rw-r--r-- | test/CodeGenCXX/default-arg-temps.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/CodeGenCXX/default-arg-temps.cpp b/test/CodeGenCXX/default-arg-temps.cpp index 2dcf773346..2651446669 100644 --- a/test/CodeGenCXX/default-arg-temps.cpp +++ b/test/CodeGenCXX/default-arg-temps.cpp @@ -7,9 +7,19 @@ struct T { void f(const T& t = T()); +class X { // ... +public: + X(); + X(const X&, const T& t = T()); +}; + void g() { - // RUN: grep "call void @_ZN1TC1Ev" %t | count 2 && - // RUN: grep "call void @_ZN1TD1Ev" %t | count 2 + // RUN: grep "call void @_ZN1TC1Ev" %t | count 4 && + // RUN: grep "call void @_ZN1TD1Ev" %t | count 4 f(); f(); + + X a; + X b(a); + X c = a; } |