summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp6
-rw-r--r--clang/test/SemaTemplate/derived.cpp18
2 files changed, 22 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index c54956db418..17576328c11 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -232,13 +232,15 @@ namespace PR7402 {
// <rdar://problem/8308215>: don't crash.
// Lots of questionable recovery here; errors can change.
namespace test3 {
- class A : public std::exception {}; // expected-error {{undeclared identifier}} expected-error {{expected class name}} expected-note 2 {{candidate}}
+ class A : public std::exception {}; // expected-error {{undeclared identifier}} expected-error {{expected class name}} expected-note 4 {{candidate}}
class B : public A {
public:
B(const String& s, int e=0) // expected-error {{unknown type name}}
: A(e), m_String(s) , m_ErrorStr(__null) {} // expected-error {{no matching constructor}} expected-error {{does not name}}
B(const B& e)
- : A(e), m_String(e.m_String), m_ErrorStr(__null) { // expected-error {{does not name}} expected-error {{no member named 'm_String' in 'test3::B'}}
+ : A(e), m_String(e.m_String), m_ErrorStr(__null) { // expected-error {{does not name}} \
+ // expected-error {{no member named 'm_String' in 'test3::B'}} \
+ // expected-error {{no matching}}
}
};
}
diff --git a/clang/test/SemaTemplate/derived.cpp b/clang/test/SemaTemplate/derived.cpp
index 1fb9401c94c..7b91f9a3ed3 100644
--- a/clang/test/SemaTemplate/derived.cpp
+++ b/clang/test/SemaTemplate/derived.cpp
@@ -10,3 +10,21 @@ void test() {
Foo2(vector2<int*>()); // expected-error{{no matching function for call to 'Foo2'}}
Foo(vector<int*>()); // expected-error{{no matching function for call to 'Foo'}}
}
+
+namespace rdar13267210 {
+ template < typename T > class A {
+ BaseTy; // expected-error{{C++ requires a type specifier for all declarations}}
+ };
+
+ template < typename T, int N > class C: A < T > {};
+
+ class B {
+ C<long, 16> ExternalDefinitions;
+ C<long, 64> &Record;
+
+ void AddSourceLocation(A<long> &R); // expected-note{{passing argument to parameter 'R' here}}
+ void AddTemplateKWAndArgsInfo() {
+ AddSourceLocation(Record); // expected-error{{non-const lvalue reference to type}}
+ }
+ };
+}
OpenPOWER on IntegriCloud