diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp | 20 |
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 0000000..ee36427 --- /dev/null +++ b/clang/test/SemaTemplate/instantiate-overloaded-arrow.cpp @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -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>(); +} + |