diff options
Diffstat (limited to 'test/SemaTemplate/instantiate-overloaded-arrow.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-overloaded-arrow.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-overloaded-arrow.cpp b/test/SemaTemplate/instantiate-overloaded-arrow.cpp new file mode 100644 index 0000000000000..7f0ef0c990ad0 --- /dev/null +++ b/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>(); +} + |