Only accept a typo correction if it doesn't trigger additional errors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141609 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/function-redecl.cpp b/test/SemaCXX/function-redecl.cpp
index b19bff6..0d9ecf3 100644
--- a/test/SemaCXX/function-redecl.cpp
+++ b/test/SemaCXX/function-redecl.cpp
@@ -44,7 +44,7 @@
class B {
- void typocorrection(const int); // expected-note {{type of 1st parameter of member declaration does not match definition}}
+ void typocorrection(const int); // expected-note {{'typocorrection' declared here}}
void typocorrection(double);
};
@@ -92,3 +92,6 @@
void TestConst::setit(int) const { // expected-error {{out-of-line definition of 'setit' does not match any declaration in 'TestConst'}}
}
+
+struct J { int typo() const; };
+int J::typo_() { return 3; } // expected-error {{out-of-line definition of 'typo_' does not match any declaration in 'J'}}