summaryrefslogtreecommitdiff
path: root/test/CXX/basic/basic.lookup
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-04-14 14:01:31 +0000
commitdbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch)
treebe1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CXX/basic/basic.lookup
parent9da628931ebf2609493570f87824ca22402cc65f (diff)
Notes
Diffstat (limited to 'test/CXX/basic/basic.lookup')
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp2
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp2
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp27
3 files changed, 28 insertions, 3 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
index cee7c0242033..f5ad68b75bdf 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
@@ -46,7 +46,7 @@ namespace M {
int g(N::X); // expected-note{{candidate function}}
void test(N::X x) {
- g(x); // expected-error{{call to 'g' is ambiguous; candidates are:}}
+ g(x); // expected-error{{call to 'g' is ambiguous}}
int i = (g)(x);
int g(N::X);
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp
index 15d86b7740c4..32dd75ad49a8 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp
@@ -44,7 +44,7 @@ namespace Test {
A::A() + A::A();
B::B() + B::B();
C::C() + C::C();
- D::D() + D::D(); // expected-error {{ invalid operands to binary expression ('D::D' and 'D::D') }}
+ D::D() + D::D(); // expected-error {{invalid operands to binary expression ('D::D' and 'D::D')}}
}
}
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'}}
+ }
+ }
+}