mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[clang-tidy] Add 'readability-suspicious-call-argument' check
Finds function calls where the call arguments might be provided in an incorrect order, based on the comparison (via string metrics) of the parameter names and the argument names against each other. A diagnostic is emitted if an argument name is similar to a *different* parameter than the one currently passed to, and it is sufficiently dissimilar to the one it **is** passed to currently. False-positive warnings from this check are useful to indicate bad naming convention issues, even if a swap isn't necessary. This check does not generate FixIts. Originally implemented by @varjujan as his Master's Thesis work. The check was subsequently taken over by @barancsuk who added type conformity checks to silence false positive matches. The work by @whisperity involved driving the check's review and fixing some more bugs in the process. Reviewed By: aaron.ballman, alexfh Differential Revision: http://reviews.llvm.org/D20689 Co-authored-by: János Varjú <varjujanos2@gmail.com> Co-authored-by: Lilla Barancsuk <barancsuklilla@gmail.com>
This commit is contained in:
parent
839ef97cbf
commit
c4c95813ae
@ -48,6 +48,7 @@ static_library("readability") {
|
|||||||
"StaticAccessedThroughInstanceCheck.cpp",
|
"StaticAccessedThroughInstanceCheck.cpp",
|
||||||
"StaticDefinitionInAnonymousNamespaceCheck.cpp",
|
"StaticDefinitionInAnonymousNamespaceCheck.cpp",
|
||||||
"StringCompareCheck.cpp",
|
"StringCompareCheck.cpp",
|
||||||
|
"SuspiciousCallArgumentCheck.cpp",
|
||||||
"UniqueptrDeleteReleaseCheck.cpp",
|
"UniqueptrDeleteReleaseCheck.cpp",
|
||||||
"UppercaseLiteralSuffixCheck.cpp",
|
"UppercaseLiteralSuffixCheck.cpp",
|
||||||
"UseAnyOfAllOfCheck.cpp",
|
"UseAnyOfAllOfCheck.cpp",
|
||||||
|
Loading…
Reference in New Issue
Block a user