Fix PR5488: special-case the overloaded arrow operator so that we don't try to
treat it as a unary operator.
llvm-svn: 88938
diff --git a/clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp b/clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp
new file mode 100644
index 0000000..7f0ef0c
--- /dev/null
+++ b/clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp
@@ -0,0 +1,20 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+// PR5488
+
+struct X {
+ int x;
+};
+
+struct Iter {
+ X* operator->();
+};
+
+template <typename T>
+void Foo() {
+ (void)Iter()->x;
+}
+
+void Func() {
+ Foo<int>();
+}
+