clang-tools 20.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 1829 of file EasilySwappableParametersCheck.cpp.
Referenced by prefixSuffixCoverUnderThreshold().
|
static |
Definition at line 1837 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 1510 of file EasilySwappableParametersCheck.cpp.
Referenced by clang::tidy::bugprone::model::modelMixingRange().
|
inlinestatic |
Definition at line 1814 of file EasilySwappableParametersCheck.cpp.
|
static |
Definition at line 1824 of file EasilySwappableParametersCheck.cpp.
Referenced by prefixSuffixCoverUnderThreshold().
|
static |
Definition at line 1819 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 1847 of file EasilySwappableParametersCheck.cpp.
References isCommonPrefixWithoutSomeCharacters(), isCommonSuffixWithoutSomeCharacters(), padStringAtBegin(), and padStringAtEnd().
Referenced by clang::tidy::bugprone::model::modelMixingRange().