diff options
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index dfc0650641..3e96d02495 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -56,7 +56,7 @@ public: // This used to crash Clang. struct Flip; -struct Flop { // expected-note{{candidate is the implicit copy constructor}} +struct Flop { Flop(); Flop(const Flip&); // expected-note{{candidate constructor}} }; @@ -202,3 +202,16 @@ namespace smart_ptr { return X(Y()); } } + +struct Any { + Any(...); +}; + +struct Other { + Other(const Other &); + Other(); +}; + +void test_any() { + Any any = Other(); // expected-error{{cannot pass object of non-POD type 'Other' through variadic constructor; call will abort at runtime}} +} |