From 97d2104486bfcdfd984b1db758ce8037d65bc872 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 10 May 2014 19:15:24 +0000 Subject: [PATCH] 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 --- test/SemaCXX/conversion-function.cpp | 3 +++ 1 file changed, 3 insertions(+) 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}} -- 2.40.0