clang-tools 18.0.0git
|
This namespace contains the implementations for the suppression of diagnostics from similarly-used ("related") parameters. More...
Classes | |
class | AccessedSameMemberOf |
Implements the heuristic that marks two parameters related if the same member is accessed (referred to) inside the current function's body. More... | |
class | AppearsInSameExpr |
Implements the heuristic that marks two parameters related if there is a usage for both in the same strict expression subtree. More... | |
class | PassedToSameFunction |
Implements the heuristic that marks two parameters related if there are two separate calls to the same function (overload) and the parameters are passed to the same index in both calls, i.e f(a, b) and f(a, c) passes b and c to the same index (2) of f(), marking them related. More... | |
class | Returned |
Implements the heuristic that marks two parameters related if different ReturnStmts return them from the function. More... | |
Typedefs | |
template<typename T , std::size_t N = SmallDataStructureSize> | |
using | ParamToSmallSetMap = llvm::DenseMap< const ParmVarDecl *, llvm::SmallSet< T, N > > |
Functions | |
template<typename MapTy , typename ElemTy > | |
bool | lazyMapOfSetsIntersectionExists (const MapTy &Map, const ElemTy &E1, const ElemTy &E2) |
Returns whether the sets mapped to the two elements in the map have at least one element in common. | |
Variables | |
static constexpr std::size_t | SmallDataStructureSize = 4 |
This namespace contains the implementations for the suppression of diagnostics from similarly-used ("related") parameters.
using clang::tidy::bugprone::filter::relatedness_heuristic::ParamToSmallSetMap = typedef llvm::DenseMap<const ParmVarDecl *, llvm::SmallSet<T, N> > |
Definition at line 1570 of file EasilySwappableParametersCheck.cpp.
bool clang::tidy::bugprone::filter::relatedness_heuristic::lazyMapOfSetsIntersectionExists | ( | const MapTy & | Map, |
const ElemTy & | E1, | ||
const ElemTy & | E2 | ||
) |
Returns whether the sets mapped to the two elements in the map have at least one element in common.
Definition at line 1576 of file EasilySwappableParametersCheck.cpp.
Referenced by clang::tidy::bugprone::filter::relatedness_heuristic::AppearsInSameExpr::operator()(), clang::tidy::bugprone::filter::relatedness_heuristic::PassedToSameFunction::operator()(), and clang::tidy::bugprone::filter::relatedness_heuristic::AccessedSameMemberOf::operator()().
|
staticconstexpr |
Definition at line 1567 of file EasilySwappableParametersCheck.cpp.