summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp6
-rw-r--r--clang/test/SemaCXX/missing-members.cpp12
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp12
-rw-r--r--clang/test/SemaTemplate/typename-specifier.cpp5
4 files changed, 18 insertions, 17 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp
index 04129f8091f..a5877d281d7 100644
--- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp
+++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p18.cpp
@@ -9,12 +9,12 @@ template<class T1> class A {
template<> template<class X>
class A<long>::B { };
-// FIXME: If we make the explicit specialization of A<long>::B, above, into
-// a specialization of A<int>::B, our diagnostic is correct but not very
-// helpful.
template<> template<> template<class T>
void A<int>::B<double>::mf1(T t) { }
+template<> template<> template<class T>
+void A<long>::B<double>::mf1(T t) { } // expected-error{{does not match}}
+
// FIXME: This diagnostic could probably be better.
template<class Y> template<>
void A<Y>::B<double>::mf2() { } // expected-error{{does not refer}}
diff --git a/clang/test/SemaCXX/missing-members.cpp b/clang/test/SemaCXX/missing-members.cpp
index 5fd4c54c1d9..28ad9a04e79 100644
--- a/clang/test/SemaCXX/missing-members.cpp
+++ b/clang/test/SemaCXX/missing-members.cpp
@@ -9,7 +9,7 @@ namespace A {
void f() {
A::B::i; // expected-error {{no member named 'i' in namespace 'A::B'}}
- A::B::C::i; // expected-error {{no member named 'i' in class 'A::B::C'}}
+ A::B::C::i; // expected-error {{no member named 'i' in 'class A::B::C'}}
::i; // expected-error {{no member named 'i' in the global namespace}}
}
@@ -19,18 +19,18 @@ namespace B {
void g() {
A::B::D::E; // expected-error {{no member named 'D' in namespace 'A::B'}}
- B::B::C::D; // expected-error {{no member named 'C' in class 'B::B'}}
+ B::B::C::D; // expected-error {{no member named 'C' in 'class B::B'}}
::C::D; // expected-error {{no member named 'C' in the global namespace}}
}
int A::B::i = 10; // expected-error {{no member named 'i' in namespace 'A::B'}}
-int A::B::C::i = 10; // expected-error {{no member named 'i' in class 'A::B::C'}}
-int A::B::S::i = 10; // expected-error {{no member named 'i' in struct 'A::B::S'}}
-int A::B::U::i = 10; // expected-error {{no member named 'i' in union 'A::B::U'}}
+int A::B::C::i = 10; // expected-error {{no member named 'i' in 'class A::B::C'}}
+int A::B::S::i = 10; // expected-error {{no member named 'i' in 'struct A::B::S'}}
+int A::B::U::i = 10; // expected-error {{no member named 'i' in 'union A::B::U'}}
using A::B::D; // expected-error {{no member named 'D' in namespace 'A::B'}}
struct S : A::B::C {
- using A::B::C::f; // expected-error {{no member named 'f' in class 'A::B::C'}}
+ using A::B::C::f; // expected-error {{no member named 'f' in 'class A::B::C'}}
};
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index ffb20d20823..4ddf3bbce4e 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -35,9 +35,9 @@ class C2 {
int x;
};
-void C2::m() const { } // expected-error{{out-of-line definition does not match any declaration in 'C2'}}
+void C2::m() const { } // expected-error{{out-of-line definition of 'm' does not match any declaration in 'class C2'}}
-void C2::f(int) { } // expected-error{{out-of-line definition does not match any declaration in 'C2'}}
+void C2::f(int) { } // expected-error{{out-of-line definition of 'f' does not match any declaration in 'class C2'}}
void C2::m() {
x = 0;
@@ -125,7 +125,7 @@ class Operators {
operator bool();
};
-Operators Operators::operator+(const Operators&) { // expected-error{{out-of-line definition does not match any declaration in 'Operators'}}
+Operators Operators::operator+(const Operators&) { // expected-error{{out-of-line definition of 'operator+' does not match any declaration in 'class Operators'}}
Operators ops;
return ops;
}
@@ -143,13 +143,13 @@ namespace A {
void g(int&); // expected-note{{member declaration nearly matches}}
}
-void A::f() {} // expected-error{{out-of-line definition does not match any declaration in 'A'}}
+void A::f() {} // expected-error{{out-of-line definition of 'f' does not match any declaration in namespace 'A'}}
-void A::g(const int&) { } // expected-error{{out-of-line definition does not match any declaration in 'A'}}
+void A::g(const int&) { } // expected-error{{out-of-line definition of 'g' does not match any declaration in namespace 'A'}}
struct Struct { };
-void Struct::f() { } // expected-error{{out-of-line definition does not match any declaration in 'Struct'}}
+void Struct::f() { } // expected-error{{out-of-line definition of 'f' does not match any declaration in 'struct Struct'}}
void global_func(int);
void global_func2(int);
diff --git a/clang/test/SemaTemplate/typename-specifier.cpp b/clang/test/SemaTemplate/typename-specifier.cpp
index d3fca3eacad..62795eb0eee 100644
--- a/clang/test/SemaTemplate/typename-specifier.cpp
+++ b/clang/test/SemaTemplate/typename-specifier.cpp
@@ -16,7 +16,7 @@ namespace N {
int i;
typename N::A::type *ip1 = &i;
-typename N::B::type *ip2 = &i; // expected-error{{ no type named 'type' in 'B'}}
+typename N::B::type *ip2 = &i; // expected-error{{no type named 'type' in 'struct N::B'}}
typename N::C::type *ip3 = &i; // expected-error{{typename specifier refers to non-type member 'type'}}
void test(double d) {
@@ -33,7 +33,8 @@ void test(double d) {
namespace N {
template<typename T>
struct X {
- typedef typename T::type type; // expected-error 2{{no type named 'type' in 'B'}} \
+ typedef typename T::type type; // expected-error {{no type named 'type' in 'struct N::B'}} \
+ // expected-error {{no type named 'type' in 'struct B'}} \
// FIXME: location info for error above isn't very good \
// expected-error 2{{typename specifier refers to non-type member 'type'}} \
// expected-error{{type 'int' cannot be used prior to '::' because it has no members}}
OpenPOWER on IntegriCloud