Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Douglas Gregor | b656d88 | 2009-10-08 22:38:14 +0000 | [diff] [blame] | 2 | |
3 | double operator +(double, double); // expected-error{{overloaded 'operator+' must have at least one parameter of class or enumeration type}} | ||||
4 | |||||
5 | struct A | ||||
6 | { | ||||
7 | operator int(); | ||||
8 | }; | ||||
9 | |||||
10 | int main() | ||||
11 | { | ||||
12 | A a, b; | ||||
13 | int i0 = a + 1; | ||||
14 | int i1 = a + b; | ||||
15 | } |