llvm-project/clang-tools-extra/clang-tidy/readability
Sam McCall 57b66c8ba3 [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
2018-07-13 11:41:56 +00:00
..
AvoidConstParamsInDecls.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
AvoidConstParamsInDecls.h [clang-tidy] Fix MSVC build. 2016-03-30 12:35:05 +00:00
BracesAroundStatementsCheck.cpp (no commit message) 2017-05-25 11:43:06 +00:00
BracesAroundStatementsCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
CMakeLists.txt Add a new check, readability-simplify-subscript-expr, that diagnoses array subscript expressions that can be simplified. 2018-05-16 20:12:06 +00:00
ContainerSizeEmptyCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
ContainerSizeEmptyCheck.h
DeleteNullPointerCheck.cpp [clang-tidy] Small cleanup. NFC. 2017-03-20 22:15:19 +00:00
DeleteNullPointerCheck.h [clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work for class members 2017-02-12 20:09:59 +00:00
DeletedDefaultCheck.cpp [clang-tidy] Add a readability-deleted-default clang-tidy check. 2016-04-13 11:33:40 +00:00
DeletedDefaultCheck.h [clang-tidy] Add a readability-deleted-default clang-tidy check. 2016-04-13 11:33:40 +00:00
ElseAfterReturnCheck.cpp [clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw 2017-11-28 14:57:47 +00:00
ElseAfterReturnCheck.h
FunctionSizeCheck.cpp [clang-tidy] readability-function-size: add VariableThreshold param. 2018-04-12 12:06:42 +00:00
FunctionSizeCheck.h [clang-tidy] readability-function-size: add VariableThreshold param. 2018-04-12 12:06:42 +00:00
IdentifierNamingCheck.cpp [clang-tools-extra] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 16:37:45 +00:00
IdentifierNamingCheck.h [clang-tidy] clang-format the last patch. NFC 2017-03-22 12:50:05 +00:00
ImplicitBoolConversionCheck.cpp [clang-tidy] 'implicit cast' -> 'implicit conversion' 2017-08-08 14:53:52 +00:00
ImplicitBoolConversionCheck.h [clang-tidy] 'implicit cast' -> 'implicit conversion' 2017-08-08 14:53:52 +00:00
InconsistentDeclarationParameterNameCheck.cpp [clang-tidy] readability-inconsistent-declaration-parameter-name: accept approximate name matches. 2018-07-13 11:41:56 +00:00
InconsistentDeclarationParameterNameCheck.h [clang-tidy] readability-inconsistent-declaration-parameter-name: accept approximate name matches. 2018-07-13 11:41:56 +00:00
MisleadingIndentationCheck.cpp [clang-tidy] readability-misleading-indentation: fix chained if 2017-03-17 09:58:30 +00:00
MisleadingIndentationCheck.h [clang-tidy] readability-misleading-indentation: fix chained if 2017-03-17 09:58:30 +00:00
MisplacedArrayIndexCheck.cpp [clang-tidy] readability-misplaced-array-index: add new check that warns when array index is misplaced. 2016-09-12 12:04:13 +00:00
MisplacedArrayIndexCheck.h [clang-tidy] readability-misplaced-array-index: add new check that warns when array index is misplaced. 2016-09-12 12:04:13 +00:00
NamedParameterCheck.cpp [clang-tidy] readability-named-parameter: don't complain about implicit parameters 2015-11-06 00:19:21 +00:00
NamedParameterCheck.h [clang-tidy] update links to Google Code Style in docs 2016-02-25 14:31:10 +00:00
NamespaceCommentCheck.cpp [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces 2018-01-11 13:00:28 +00:00
NamespaceCommentCheck.h [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces 2018-01-11 13:00:28 +00:00
NonConstParameterCheck.cpp [clang-tidy] readability-non-const-parameter fixes should update all declarations 2017-11-27 12:42:04 +00:00
NonConstParameterCheck.h [clang-tidy] readability-non-const-parameter: add new check that warns when function parameters should be const 2016-08-23 10:09:08 +00:00
ReadabilityTidyModule.cpp Add a new check, readability-simplify-subscript-expr, that diagnoses array subscript expressions that can be simplified. 2018-05-16 20:12:06 +00:00
RedundantControlFlowCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
RedundantControlFlowCheck.h Add a new check, readability-redundant-control-flow, that check for some forms of redundant control flow statements. Currently checks for return statements at the end of a function with a void return type and continue statements at the end of looping statements. 2016-02-01 15:31:15 +00:00
RedundantDeclarationCheck.cpp [clang-tidy] readability-redundant-declaration: ignore friends and macros 2017-07-28 12:46:02 +00:00
RedundantDeclarationCheck.h [clang-tidy] readability-redundant-declaration: ignore friends and macros 2017-07-28 12:46:02 +00:00
RedundantFunctionPtrDereferenceCheck.cpp [clang-tidy] Add check for redundant function pointer dereferences 2016-12-13 08:04:11 +00:00
RedundantFunctionPtrDereferenceCheck.h [clang-tidy] Add check for redundant function pointer dereferences 2016-12-13 08:04:11 +00:00
RedundantMemberInitCheck.cpp [clang-tidy] Handle anonymous structs/unions in member init checks. 2017-08-01 09:54:05 +00:00
RedundantMemberInitCheck.h [clang-tidy] Add check 'readability-redundant-member-init' 2016-10-20 16:08:03 +00:00
RedundantSmartptrGetCheck.cpp [clang-tidy] Expand readability-redundant-smartptr-get to understand implicit converions to bool in more contexts. 2018-01-15 18:03:20 +00:00
RedundantSmartptrGetCheck.h
RedundantStringCStrCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
RedundantStringCStrCheck.h
RedundantStringInitCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
RedundantStringInitCheck.h Add a new check, readability-redundant-string-init, that checks unnecessary string initializations. 2016-02-25 23:57:23 +00:00
SimplifyBooleanExprCheck.cpp [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type 2018-05-22 17:24:28 +00:00
SimplifyBooleanExprCheck.h [clang-tidy] Partly rewrite readability-simplify-boolean-expr using RAV 2017-05-15 17:06:51 +00:00
SimplifySubscriptExprCheck.cpp Add a new check, readability-simplify-subscript-expr, that diagnoses array subscript expressions that can be simplified. 2018-05-16 20:12:06 +00:00
SimplifySubscriptExprCheck.h Add a new check, readability-simplify-subscript-expr, that diagnoses array subscript expressions that can be simplified. 2018-05-16 20:12:06 +00:00
StaticAccessedThroughInstanceCheck.cpp [clang-tidy] Add new readability non-idiomatic static access check 2017-08-08 15:33:48 +00:00
StaticAccessedThroughInstanceCheck.h [clang-tidy] Add new readability non-idiomatic static access check 2017-08-08 15:33:48 +00:00
StaticDefinitionInAnonymousNamespaceCheck.cpp [clang-tidy] Use isStaticStorageClass ast matcher. 2016-09-27 07:58:52 +00:00
StaticDefinitionInAnonymousNamespaceCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
StringCompareCheck.cpp clang-tidy/rename_check.py misc-string-compare readability-string-compare 2018-01-30 14:55:50 +00:00
StringCompareCheck.h clang-tidy/rename_check.py misc-string-compare readability-string-compare 2018-01-30 14:55:50 +00:00
UniqueptrDeleteReleaseCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UniqueptrDeleteReleaseCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00