summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/member-access-expr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-22 07:19:14 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-22 07:19:14 +0000
commita9e29aa4b1e5042a763240899d8b8cf1267c3ec5 (patch)
tree4a82fbafdfe6d7a9a2b611b3d0ebcbd23799fb68 /test/SemaTemplate/member-access-expr.cpp
parente961afbf3f5604b043773192de77effa207cbe8c (diff)
downloadclang-a9e29aa4b1e5042a763240899d8b8cf1267c3ec5.tar.gz
When a template-id expression refers to a member function template, turn it into an (implicit) member access expression. Fixes PR5220
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/member-access-expr.cpp')
-rw-r--r--test/SemaTemplate/member-access-expr.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/SemaTemplate/member-access-expr.cpp b/test/SemaTemplate/member-access-expr.cpp
index f4922e8ff5..0a6a6bc099 100644
--- a/test/SemaTemplate/member-access-expr.cpp
+++ b/test/SemaTemplate/member-access-expr.cpp
@@ -74,4 +74,17 @@ void test_destruct(X2 *x2p, int *ip) {
destruct(x2p);
destruct(ip);
destruct_intptr<int>(ip);
-} \ No newline at end of file
+}
+
+// PR5220
+class X3 {
+protected:
+ template <int> float* &f0();
+ template <int> const float* &f0() const;
+ void f1() {
+ (void)static_cast<float*>(f0<0>());
+ }
+ void f1() const{
+ (void)f0<0>();
+ }
+};