From: Nico Weber Date: Sat, 10 May 2014 19:15:24 +0000 (+0000) Subject: Add test coverage for invalid conversion functions with default args. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97d2104486bfcdfd984b1db758ce8037d65bc872;p=clang Add test coverage for invalid conversion functions with default args. This currently leaks memory (PR19689) but wasn't covered by tests, so LSan couldn't find it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208477 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index 1d5700df98..dcc0609b58 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -26,6 +26,9 @@ class Y { public: void operator bool(int, ...) const; // expected-error{{conversion function cannot have a return type}} \ // expected-error{{conversion function cannot have any parameters}} + + operator bool(int a = 4) const; // expected-error{{conversion function cannot have any parameters}} + operator float(...) const; // expected-error{{conversion function cannot be variadic}}