diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-19 22:59:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-19 22:59:19 +0000 |
commit | 9ebae31a97f862771dc5f6bd4923dd97131fed71 (patch) | |
tree | bfc60f0e00c4ece3fa699df7bc4640c700c6c669 | |
parent | 106c6eb3f1380bfe243a62d8f0f8bce6a7c8d5c6 (diff) |
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
-rw-r--r-- | test/SemaCXX/overloaded-operator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |