From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/SemaCXX/constructor-initializer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/SemaCXX/constructor-initializer.cpp') diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp index cf309f5..31d5330 100644 --- a/test/SemaCXX/constructor-initializer.cpp +++ b/test/SemaCXX/constructor-initializer.cpp @@ -221,3 +221,17 @@ namespace PR7402 { S s(3); } } + +// : 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 3 {{candidate}} expected-note {{passing argument}} + 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 {{no viable conversion}} expected-error {{does not name}} + } + }; +} -- cgit v1.1