aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/constructor-initializer.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-03-26 23:36:30 +0000
committerDouglas Gregor <dgregor@apple.com>2013-03-26 23:36:30 +0000
commit0162c1ce296fc48fbe03a31a2ae00b939eef86a8 (patch)
treeb2b56e876043541f2a0dbc228e506a8c89c4e82a /test/SemaCXX/constructor-initializer.cpp
parent7020346e4137375d41fc4ac70bfda06e2c724444 (diff)
<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types.
When Sema::RequireCompleteType() is given a class template specialization type that then fails to instantiate, it returns 'true'. On subsequent invocations, it can return false. Make sure that this difference doesn't change the result of Sema::CompareReferenceRelationship, which is expected to remain stable while we're checking an initialization sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/constructor-initializer.cpp')
-rw-r--r--test/SemaCXX/constructor-initializer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp
index c54956db41..17576328c1 100644
--- a/test/SemaCXX/constructor-initializer.cpp
+++ b/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}}
}
};
}