summaryrefslogtreecommitdiffstats
path: root/test/CXX
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-03-10 23:52:41 +0000
committerDouglas Gregor <dgregor@apple.com>2012-03-10 23:52:41 +0000
commit5a7a5bb20904a1d34255b772c87b930e798f59a8 (patch)
treeab128abaaa6bda86eea908bf93e4f1d8d5124a72 /test/CXX
parent426d6ca163e20187761aa55a67797dac51508d0d (diff)
When determining whether an identifier followed by a '<' in a member
access expression is the start of a template-id, ignore function templates found in the context of the entire postfix-expression. Fixes PR11856. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
index b57921f6be..c207283327 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp
@@ -62,3 +62,28 @@ namespace rdar9915664 {
}
};
}
+
+namespace PR11856 {
+ template<typename T> T end(T);
+
+ template <typename T>
+ void Foo() {
+ T it1;
+ if (it1->end < it1->end) {
+ }
+ }
+
+ template<typename T> T *end(T*);
+
+ class X { };
+ template <typename T>
+ void Foo2() {
+ T it1;
+ if (it1->end < it1->end) {
+ }
+
+ X *x;
+ if (x->end < 7) { // expected-error{{no member named 'end' in 'PR11856::X'}}
+ }
+ }
+}