clang-tools  14.0.0git
Namespaces | Functions
AvoidBindCheck.cpp File Reference
#include "AvoidBindCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cstddef>
#include <string>
Include dependency graph for AvoidBindCheck.cpp:

Go to the source code of this file.

Namespaces

 clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
 clang::tidy
 
 clang::tidy::modernize
 

Functions

static bool clang::tidy::modernize::tryCaptureAsLocalVariable (const MatchFinder::MatchResult &Result, BindArgument &B, const Expr *E)
 
static bool clang::tidy::modernize::tryCaptureAsMemberVariable (const MatchFinder::MatchResult &Result, BindArgument &B, const Expr *E)
 
static const Expr * clang::tidy::modernize::ignoreTemporariesAndPointers (const Expr *E)
 
static const Expr * clang::tidy::modernize::ignoreTemporariesAndConstructors (const Expr *E)
 
static StringRef clang::tidy::modernize::getSourceTextForExpr (const MatchFinder::MatchResult &Result, const Expr *E)
 
static bool clang::tidy::modernize::isCallExprNamed (const Expr *E, StringRef Name)
 
static void clang::tidy::modernize::initializeBindArgumentForCallExpr (const MatchFinder::MatchResult &Result, BindArgument &B, const CallExpr *CE, unsigned &CaptureIndex)
 
static bool clang::tidy::modernize::anyDescendantIsLocal (const Stmt *Statement)
 
static SmallVector< BindArgument, 4 > clang::tidy::modernize::buildBindArguments (const MatchFinder::MatchResult &Result, const CallableInfo &Callable)
 
static int clang::tidy::modernize::findPositionOfPlaceholderUse (ArrayRef< BindArgument > Args, size_t PlaceholderIndex)
 
static void clang::tidy::modernize::addPlaceholderArgs (const LambdaProperties &LP, llvm::raw_ostream &Stream, bool PermissiveParameterList)
 
static void clang::tidy::modernize::addFunctionCallArgs (ArrayRef< BindArgument > Args, llvm::raw_ostream &Stream)
 
static bool clang::tidy::modernize::isPlaceHolderIndexRepeated (const ArrayRef< BindArgument > Args)
 
static std::vector< const FunctionDecl * > clang::tidy::modernize::findCandidateCallOperators (const CXXRecordDecl *RecordDecl, size_t NumArgs)
 
static bool clang::tidy::modernize::isFixitSupported (const CallableInfo &Callee, ArrayRef< BindArgument > Args)
 
const FunctionDecl * clang::tidy::modernize::getCallOperator (const CXXRecordDecl *Callable, size_t NumArgs)
 
const FunctionDecl * clang::tidy::modernize::getCallMethodDecl (const MatchFinder::MatchResult &Result, CallableType Type, CallableMaterializationKind Materialization)
 
static CallableType clang::tidy::modernize::getCallableType (const MatchFinder::MatchResult &Result)
 
static CallableMaterializationKind clang::tidy::modernize::getCallableMaterialization (const MatchFinder::MatchResult &Result)
 
static LambdaProperties clang::tidy::modernize::getLambdaProperties (const MatchFinder::MatchResult &Result)
 
static bool clang::tidy::modernize::emitCapture (llvm::StringSet<> &CaptureSet, StringRef Delimiter, CaptureMode CM, CaptureExpr CE, StringRef Identifier, StringRef InitExpression, raw_ostream &Stream)
 
static void clang::tidy::modernize::emitCaptureList (const LambdaProperties &LP, const MatchFinder::MatchResult &Result, raw_ostream &Stream)
 
static ArrayRef< BindArgument > clang::tidy::modernize::getForwardedArgumentList (const LambdaProperties &P)
 

Variable Documentation

◆ BindArguments

SmallVector<BindArgument, 4> BindArguments

Definition at line 105 of file AvoidBindCheck.cpp.

◆ BindNamespace

StringRef BindNamespace

Definition at line 106 of file AvoidBindCheck.cpp.

◆ Callable

CallableInfo Callable

Definition at line 104 of file AvoidBindCheck.cpp.

Referenced by clang::tidy::modernize::getCallOperator().

◆ CaptureIdentifier

std::string CaptureIdentifier

Definition at line 75 of file AvoidBindCheck.cpp.

◆ CaptureInitializer

StringRef CaptureInitializer

Definition at line 99 of file AvoidBindCheck.cpp.

◆ CE

CaptureExpr CE = CE_None

◆ CM

CaptureMode CM = CM_None

◆ Decl

const FunctionDecl* Decl = nullptr

◆ E

const Expr* E = nullptr

Definition at line 88 of file AvoidBindCheck.cpp.

Referenced by EntityMap::add(), addModuleDescription(), clang::tidy::readability::AST_MATCHER(), clang::tidy::bugprone::checkOverrideByDerivedMethod(), Modularize::CoverageChecker::collectFileSystemHeaders(), Modularize::CoverageChecker::collectModuleHeaders(), Modularize::ModularizeUtilities::collectModuleMapHeaders(), clang::replace::collectReplacementsFromDirectory(), clang::tidy::bugprone::countNonPowOfTwoLiteralNum(), clang::doc::decodeRecord(), clang::clangd::evaluateDecisionForest(), findInputFile(), Modularize::CoverageChecker::findUnaccountedForHeaders(), clang::clangd::fromJSON(), clang::doc::genEnumsBlock(), clang::tidy::readability::getConstructExprArgRange(), llvm::DenseMapInfo< clang::clangd::RefSlab::Builder::Entry >::getEmptyKey(), clang::doc::serialize::getInfoRelativePath(), clang::pp_trace::PPCallbacksTracker::getSourceString(), llvm::DenseMapInfo< clang::clangd::RefSlab::Builder::Entry >::getTombstoneKey(), clang::clangd::increment(), clang::clangd::RefSlab::Builder::insert(), clang::tidy::bugprone::isLikelyTypo(), Modularize::ModularizeUtilities::loadAllHeaderListsAndDependencies(), loadModuleDescriptions(), clang::doc::serialize::parseEnumerators(), replaceDotDot(), clang::clangd::Tweak::Effect::showMessage(), clang::clangd::TEST(), clang::tidy::bugprone::filter::relatedness_heuristic::AppearsInSameExpr::TraverseStmt(), clang::doc::serialize::ClangDocCommentVisitor::visitBlockCommandComment(), clang::clangd::InlayHintVisitor::VisitCallExpr(), clang::clangd::InlayHintVisitor::VisitCXXConstructExpr(), clang::tidy::readability::FindUsageOfThis::VisitCXXThisExpr(), clang::doc::serialize::ClangDocCommentVisitor::visitHTMLStartTagComment(), and clang::doc::serialize::ClangDocCommentVisitor::visitInlineCommandComment().

◆ IsFixitSupported

bool IsFixitSupported = false

Definition at line 107 of file AvoidBindCheck.cpp.

◆ IsUsed

bool IsUsed = false

Definition at line 85 of file AvoidBindCheck.cpp.

Referenced by clang::tidy::modernize::addPlaceholderArgs().

◆ Kind

BindArgumentKind Kind = BK_Other

◆ Materialization

CallableMaterializationKind Materialization = CMK_Other

Definition at line 93 of file AvoidBindCheck.cpp.

◆ PlaceHolderIndex

size_t PlaceHolderIndex = 0

◆ SourceTokens

StringRef SourceTokens

Definition at line 70 of file AvoidBindCheck.cpp.

◆ Type

CallableType Type = CT_Other

Definition at line 92 of file AvoidBindCheck.cpp.

◆ UsageIdentifier

std::string UsageIdentifier

Definition at line 79 of file AvoidBindCheck.cpp.