HomePhabricator

[clang-tidy] readability-inconsistent-declaration-parameter-name: accept…

Authored by sammccall on Jul 13 2018, 4:41 AM.

Description

[clang-tidy] readability-inconsistent-declaration-parameter-name: accept approximate name matches.

Summary:
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.

The old behavior is available as a 'Strict' option.

Subscribers: xazax.hun, cfe-commits

Differential Revision: https://reviews.llvm.org/D49285

llvm-svn: 336992