summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-11-16 19:13:03 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-11-16 19:13:03 +0000
commitf2f534d12a6eaa2e5b51f3f6437c3486753c311c (patch)
tree5f24a782cf12934d7eddb7b3121e8410769b95b4 /clang/test
parentb3b44ce433a459ad49531c5528259580ee4cc6ee (diff)
downloadbcm5719-llvm-f2f534d12a6eaa2e5b51f3f6437c3486753c311c.tar.gz
bcm5719-llvm-f2f534d12a6eaa2e5b51f3f6437c3486753c311c.zip
Fix PR5488: special-case the overloaded arrow operator so that we don't try to
treat it as a unary operator. llvm-svn: 88938
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp b/clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp
new file mode 100644
index 00000000000..7f0ef0c990a
--- /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>();
+}
+
OpenPOWER on IntegriCloud