diff options
Diffstat (limited to 'test/SemaCXX/pr13394-crash-on-invalid.cpp')
-rw-r--r-- | test/SemaCXX/pr13394-crash-on-invalid.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/SemaCXX/pr13394-crash-on-invalid.cpp b/test/SemaCXX/pr13394-crash-on-invalid.cpp index 413c52a..841e3c2 100644 --- a/test/SemaCXX/pr13394-crash-on-invalid.cpp +++ b/test/SemaCXX/pr13394-crash-on-invalid.cpp @@ -9,8 +9,21 @@ namespace stretch_v1 { namespace gatekeeper_v1 { namespace gatekeeper_factory_v1 { struct closure_t { // expected-note {{'closure_t' declared here}} - gatekeeper_v1::closure_t* create(); // expected-error {{no type named 'closure_t' in namespace 'gatekeeper_v1'; did you mean 'closure_t'?}} + gatekeeper_v1::closure_t* create(); // expected-error {{no type named 'closure_t' in namespace 'gatekeeper_v1'; did you mean simply 'closure_t'?}} }; } - gatekeeper_v1::closure_t *x; // expected-error {{no type named 'closure_t' in namespace 'gatekeeper_v1}} + // FIXME: Typo correction should remove the 'gatekeeper_v1::' name specifier + gatekeeper_v1::closure_t *x; // expected-error-re {{no type named 'closure_t' in namespace 'gatekeeper_v1'$}} } + +namespace Foo { +struct Base { + void Bar() {} // expected-note{{'Bar' declared here}} +}; +} + +struct Derived : public Foo::Base { + void test() { + Foo::Bar(); // expected-error{{no member named 'Bar' in namespace 'Foo'; did you mean simply 'Bar'?}} + } +}; |