diff options
Diffstat (limited to 'clang/test/SemaCXX/function-redecl.cpp')
| -rw-r--r-- | clang/test/SemaCXX/function-redecl.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/function-redecl.cpp b/clang/test/SemaCXX/function-redecl.cpp index b15d8661658..8c734945f25 100644 --- a/clang/test/SemaCXX/function-redecl.cpp +++ b/clang/test/SemaCXX/function-redecl.cpp @@ -24,3 +24,29 @@ namespace N { } } } + +class A { + void typocorrection(); // expected-note {{'typocorrection' declared here}} +}; + +void A::Notypocorrection() { // expected-error {{out-of-line definition of 'Notypocorrection' does not match any declaration in 'A'; did you mean 'typocorrection'}} +} + + +namespace test0 { + void dummy() { + void Bar(); // expected-note {{'Bar' declared here}} + class A { + friend void bar(); // expected-error {{no matching function 'bar' found in local scope; did you mean 'Bar'}} + }; + } +} + + +class B { + void typocorrection(const int); // expected-note {{type of 1st parameter of member declaration does not match definition}} + void typocorrection(double); +}; + +void B::Notypocorrection(int) { // expected-error {{out-of-line definition of 'Notypocorrection' does not match any declaration in 'B'; did you mean 'typocorrection'}} +} |

