diff options
Diffstat (limited to 'test/CXX/expr/p3.cpp')
-rw-r--r-- | test/CXX/expr/p3.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CXX/expr/p3.cpp b/test/CXX/expr/p3.cpp new file mode 100644 index 000000000000..40fe052f6342 --- /dev/null +++ b/test/CXX/expr/p3.cpp @@ -0,0 +1,15 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +double operator +(double, double); // expected-error{{overloaded 'operator+' must have at least one parameter of class or enumeration type}} + +struct A +{ + operator int(); +}; + +int main() +{ + A a, b; + int i0 = a + 1; + int i1 = a + b; +} |