r208477 - Add test coverage for invalid conversion functions with default args.
Nico Weber
nicolasweber at gmx.de
Sat May 10 12:15:24 PDT 2014
Author: nico
Date: Sat May 10 14:15:24 2014
New Revision: 208477
URL: http://llvm.org/viewvc/llvm-project?rev=208477&view=rev
Log:
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.
Modified:
cfe/trunk/test/SemaCXX/conversion-function.cpp
Modified: cfe/trunk/test/SemaCXX/conversion-function.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/conversion-function.cpp?rev=208477&r1=208476&r2=208477&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/conversion-function.cpp (original)
+++ cfe/trunk/test/SemaCXX/conversion-function.cpp Sat May 10 14:15:24 2014
@@ -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}}
More information about the cfe-commits
mailing list