]> granicus.if.org Git - clang/commitdiff
Beef up the test for function call operators slightly
authorDouglas Gregor <dgregor@apple.com>
Wed, 19 Nov 2008 22:59:19 +0000 (22:59 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 19 Nov 2008 22:59:19 +0000 (22:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59675 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/overloaded-operator.cpp

index cc3f3158d003c80335c32d76f6d4026bc91db9c8..cf8af68b571eca96c9eae2f967be68000cc98b3d 100644 (file)
@@ -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();
 }