clang-tools 17.0.0git
|
Namespaces | |
namespace | relatedness_heuristic |
This namespace contains the implementations for the suppression of diagnostics from similarly-used ("related") parameters. | |
Classes | |
class | SimilarlyUsedParameterPairSuppressor |
Helper class that is used to detect if two parameters of the same function are used in a similar fashion, to suppress the result. More... | |
Functions | |
static bool | isIgnoredParameter (const TheCheck &Check, const ParmVarDecl *Node) |
Returns whether the parameter's name or the parameter's type's name is configured by the user to be ignored from analysis and diagnostic. | |
static bool | isSimilarlyUsedParameter (const SimilarlyUsedParameterPairSuppressor &Suppressor, const ParmVarDecl *Param1, const ParmVarDecl *Param2) |
static bool | prefixSuffixCoverUnderThreshold (std::size_t Threshold, StringRef Str1, StringRef Str2) |
Returns whether the two strings are prefixes or suffixes of each other with at most Threshold characters differing on the non-common end. | |
static void | padStringAtEnd (SmallVectorImpl< char > &Str, std::size_t ToLen) |
static void | padStringAtBegin (SmallVectorImpl< char > &Str, std::size_t ToLen) |
static bool | isCommonPrefixWithoutSomeCharacters (std::size_t N, StringRef S1, StringRef S2) |
static bool | isCommonSuffixWithoutSomeCharacters (std::size_t N, StringRef S1, StringRef S2) |
|
static |
Definition at line 1828 of file EasilySwappableParametersCheck.cpp.
Referenced by prefixSuffixCoverUnderThreshold().
|
static |
Definition at line 1836 of file EasilySwappableParametersCheck.cpp.
Referenced by prefixSuffixCoverUnderThreshold().
|
static |
Returns whether the parameter's name or the parameter's type's name is configured by the user to be ignored from analysis and diagnostic.
Definition at line 1509 of file EasilySwappableParametersCheck.cpp.
References E.
Referenced by clang::tidy::bugprone::model::modelMixingRange().
|
inlinestatic |
Definition at line 1813 of file EasilySwappableParametersCheck.cpp.
|
static |
Definition at line 1823 of file EasilySwappableParametersCheck.cpp.
Referenced by prefixSuffixCoverUnderThreshold().
|
static |
Definition at line 1818 of file EasilySwappableParametersCheck.cpp.
Referenced by prefixSuffixCoverUnderThreshold().
|
static |
Returns whether the two strings are prefixes or suffixes of each other with at most Threshold characters differing on the non-common end.
Definition at line 1846 of file EasilySwappableParametersCheck.cpp.
References isCommonPrefixWithoutSomeCharacters(), isCommonSuffixWithoutSomeCharacters(), padStringAtBegin(), and padStringAtEnd().
Referenced by clang::tidy::bugprone::model::modelMixingRange().