Support explicit C++ member operator syntax, from James Porter!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80608 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/member-operator-expr.cpp b/test/SemaCXX/member-operator-expr.cpp
new file mode 100644
index 0000000..4d0e00f
--- /dev/null
+++ b/test/SemaCXX/member-operator-expr.cpp
@@ -0,0 +1,29 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+class X {
+public:
+  int operator++();
+  operator int();
+};
+
+void test() {
+  X x;
+  int i;
+
+  i = x.operator++();
+  i = x.operator int();
+  x.operator--(); // expected-error{{no member named 'operator--'}}
+  x.operator float(); // expected-error{{no member named 'operator float'}}
+  x.operator; // expected-error{{missing type specifier after 'operator'}}
+}
+
+void test2() {
+  X *x;
+  int i;
+
+  i = x->operator++();
+  i = x->operator int();
+  x->operator--(); // expected-error{{no member named 'operator--'}}
+  x->operator float(); // expected-error{{no member named 'operator float'}}
+  x->operator; // expected-error{{missing type specifier after 'operator'}}
+}