Fix -ast-print for uses of operator->.

Patch by Grzegorz Jablonski.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165832 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/ast-print.cpp b/test/CXX/ast-print.cpp
new file mode 100644
index 0000000..fb8588d
--- /dev/null
+++ b/test/CXX/ast-print.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -ast-print %s | FileCheck %s
+
+// CHECK: r;
+// CHECK-NEXT: (r->method());
+struct MyClass
+{
+    void method() {}
+};
+
+struct Reference
+{
+    MyClass* object;
+    MyClass* operator ->() { return object; }
+};
+
+int main()
+{
+    Reference r;
+    (r->method());
+}
+