diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
| commit | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch) | |
| tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CXX/basic/basic.lookup/basic.lookup.classref | |
| parent | 9da628931ebf2609493570f87824ca22402cc65f (diff) | |
Notes
Diffstat (limited to 'test/CXX/basic/basic.lookup/basic.lookup.classref')
| -rw-r--r-- | test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp | 27 |
1 files changed, 26 insertions, 1 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 c35af1def208..c20728332704 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp @@ -36,7 +36,7 @@ void resolves_to_different() { Value v; // The fact that the next line is a warning rather than an error is an // extension. - v.set<double>(3.2); // expected-warning{{lookup of 'set' in member access expression is ambiguous; using member of 'Value' [-Wambiguous-member-template]}} + v.set<double>(3.2); // expected-warning{{lookup of 'set' in member access expression is ambiguous; using member of 'Value'}} } { int set; // Non-template. @@ -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'}} + } + } +} |
