From: Douglas Gregor Date: Wed, 19 Nov 2008 22:59:19 +0000 (+0000) Subject: Beef up the test for function call operators slightly X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ebae31a97f862771dc5f6bd4923dd97131fed71;p=clang Beef up the test for function call operators slightly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59675 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp index cc3f3158d0..cf8af68b57 100644 --- a/test/SemaCXX/overloaded-operator.cpp +++ b/test/SemaCXX/overloaded-operator.cpp @@ -141,10 +141,12 @@ typedef float& Func2(int, double); struct ConvertToFunc { operator Func1*(); // expected-note{{conversion candidate of type 'int &(*)(float, double)'}} operator Func2&(); // expected-note{{conversion candidate of type 'float &(&)(int, double)'}} + void operator()(); }; void test_funcptr_call(ConvertToFunc ctf) { int &i1 = ctf(1.0f, 2.0); float &f2 = ctf((short int)1, 1.0f); ctf((long int)17, 2.0); // expected-error{{error: call to object of type 'struct ConvertToFunc' is ambiguous; candidates are:}} + ctf(); }