diff options
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 2dcf773346a8..2651446669b8 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; } |