This patch improves the displayed diagnostics when encountering a redefinition of a function whose previous definition was typo-corrected.
For example, given a code sample like this:
class Foo { int* create_process(int pid, const char* name); }; int *Foo::create_process2(int pid, const char* name) { return 0; } int *Foo::create_process(int pid, const char* name) { return 0; }
Clang will now show only the error diagnostic for the definition of create_process2: "out-of-line definition of 'create_process2' does not match any declaration in 'Foo'; did you mean 'create_process'?". However, prior to this patch, clang would have also shown a second error diagnostic for the definition of create_process: "redefinition of 'create_process'". The second diagnostic shouldn't be presented as it's not true, and the automatic renaming of create_process2 shouldn't cause such an error.