clang-tools  14.0.0git
Public Member Functions | List of all members
clang::tidy::bugprone::filter::relatedness_heuristic::PassedToSameFunction Class Reference

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...

Public Member Functions

void setup (const FunctionDecl *FD)
 
bool operator() (const ParmVarDecl *Param1, const ParmVarDecl *Param2) const
 

Detailed Description

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.

Definition at line 1648 of file EasilySwappableParametersCheck.cpp.

Member Function Documentation

◆ operator()()

bool clang::tidy::bugprone::filter::relatedness_heuristic::PassedToSameFunction::operator() ( const ParmVarDecl *  Param1,
const ParmVarDecl *  Param2 
) const
inline

◆ setup()

void clang::tidy::bugprone::filter::relatedness_heuristic::PassedToSameFunction::setup ( const FunctionDecl *  FD)
inline

The documentation for this class was generated from the following file: