clang-tools 22.0.0git
clang::tidy::bugprone::filter::relatedness_heuristic Namespace Reference

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
template<typename T, std::size_t N = SmallDataStructureSize>
using ParamToSmallPtrSetMap

Functions

template<typename MapTy, typename ElemTy>
static 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

Detailed Description

This namespace contains the implementations for the suppression of diagnostics from similarly-used ("related") parameters.

Typedef Documentation

◆ ParamToSmallPtrSetMap

template<typename T, std::size_t N = SmallDataStructureSize>
using clang::tidy::bugprone::filter::relatedness_heuristic::ParamToSmallPtrSetMap
Initial value:
llvm::DenseMap<const ParmVarDecl *, llvm::SmallPtrSet<T, N>>

Definition at line 1579 of file EasilySwappableParametersCheck.cpp.

◆ ParamToSmallSetMap

template<typename T, std::size_t N = SmallDataStructureSize>
using clang::tidy::bugprone::filter::relatedness_heuristic::ParamToSmallSetMap
Initial value:
llvm::DenseMap<const ParmVarDecl *, llvm::SmallSet<T, N>>

Definition at line 1575 of file EasilySwappableParametersCheck.cpp.

Function Documentation

◆ lazyMapOfSetsIntersectionExists()

template<typename MapTy, typename ElemTy>
bool clang::tidy::bugprone::filter::relatedness_heuristic::lazyMapOfSetsIntersectionExists ( const MapTy & Map,
const ElemTy & E1,
const ElemTy & E2 )
static

Variable Documentation

◆ SmallDataStructureSize

std::size_t clang::tidy::bugprone::filter::relatedness_heuristic::SmallDataStructureSize = 4
staticconstexpr

Definition at line 1572 of file EasilySwappableParametersCheck.cpp.