The goal is to reduce false positives when the difference is intentional, like:
foo(StringRef name);
foo(StringRef name_ref) {
string name = cleanup(name_ref); ...
}
Or semantically unimportant, like:
foo(StringRef full_name);
foo(StringRef name) { ... }
There are other matching names we won't recognise (e.g. syns vs synonyms) but
this catches many that we see in practice, and gives people a systematic
workaround.
I have a concern that this is too general -- it will cover the middle case like inBFix in you test, which seems not happen often in the real world.
Two important cases are prefix and suffix, maybe just restrict to these two cases?