clang-tools 10.0.0

Namespaces | Enumerations | 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/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

## Enumerations
enum | clang::tidy::modernize::@397::BindArgumentKind
enum | clang::tidy::modernize::@397::CaptureMode
enum | clang::tidy::modernize::@397::CallableType
enum | clang::tidy::modernize::@397::CallableMaterializationKind

## Functions
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 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 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 CXXMethodDecl * > | 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, 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)

## Enumeration Type Documentation

## ◆ BindArgumentKind

enum clang::tidy::modernize::@397::BindArgumentKind

Definition at line 37 of file AvoidBindCheck.cpp.

## ◆ CallableMaterializationKind

enum clang::tidy::modernize::@397::CallableMaterializationKind

Definition at line 47 of file AvoidBindCheck.cpp.

## ◆ CallableType

enum clang::tidy::modernize::@397::CallableType

Definition at line 40 of file AvoidBindCheck.cpp.

## ◆ CaptureMode

enum clang::tidy::modernize::@397::CaptureMode

Definition at line 38 of file AvoidBindCheck.cpp.

## Variable Documentation

## ◆ BindArguments

SmallVector<BindArgument, 4> BindArguments

Definition at line 98 of file AvoidBindCheck.cpp.

## ◆ BindNamespace

StringRef BindNamespace

Definition at line 99 of file AvoidBindCheck.cpp.

## ◆ Callable

CallableInfo Callable

Definition at line 97 of file AvoidBindCheck.cpp.

## ◆ CaptureIdentifier

std::string CaptureIdentifier

Definition at line 69 of file AvoidBindCheck.cpp.

## ◆ CaptureInitializer

StringRef CaptureInitializer

Definition at line 92 of file AvoidBindCheck.cpp.

## ◆ CM

CaptureMode CM = CM_None

Definition at line 61 of file AvoidBindCheck.cpp.

Referenced by clang::clangd::isInstanceMember().

## ◆ Decl

const FunctionDecl* Decl = nullptr

Definition at line 93 of file AvoidBindCheck.cpp.

Referenced by clang::tidy::modernize::anyDescendantIsLocal(), clang::clangd::categorize(), clang::move::HelperDeclRefGraph::dump(), clang::clangd::explicitReferenceTargets(), clang::tidy::readability::findStyleKind(), clang::clangd::SelectionTree::Node::getDeclContext(), clang::move::HelperDeclRGBuilder::getGraph(), clang::clangd::getIndexableLocalDecls(), clang::move::ClangMoveTool::getMovedDecls(), clang::clangd::getNonLocalDeclRefs(), clang::tidy::bugprone::isPtrOrReferenceForVar(), clang::tidy::readability::IdentifierNamingCheck::onEndOfTranslationUnit(), clang::tidy::bugprone::ForwardDeclarationNamespaceCheck::onEndOfTranslationUnit(), clang::move::ClangMoveTool::onEndOfTranslationUnit(), clang::doc::serialize::parseBases(), and clang::clangd::SymbolCollector::setPreprocessor().

## ◆ E

const Expr* E = nullptr

Definition at line 82 of file AvoidBindCheck.cpp.

Referenced by EntityMap::add(), addModuleDescription(), clang::clangd::ClangdServer::applyTweak(), clang::tidy::readability::AST_MATCHER(), clang::tidy::bugprone::checkOverrideByDerivedMethod(), clang::tidy::ClangTidyASTConsumerFactory::ClangTidyASTConsumerFactory(), Modularize::CoverageChecker::collectFileSystemHeaders(), Modularize::CoverageChecker::collectModuleHeaders(), Modularize::ModularizeUtilities::collectModuleMapHeaders(), clang::replace::collectReplacementsFromDirectory(), Modularize::CoverageChecker::collectUmbrellaHeaders(), Modularize::ModularizeUtilities::collectUmbrellaHeaders(), clang::tidy::bugprone::countNonPowOfTwoLiteralNum(), clang::doc::decodeRecord(), clang::doc::findGeneratorByName(), findInputFile(), Modularize::CoverageChecker::findUnaccountedForHeaders(), clang::tidy::ClangTidyOptions::getDefaults(), clang::doc::serialize::getInfoRelativePath(), clang::pp_trace::PPCallbacksTracker::getSourceString(), clang::tidy::bugprone::isLikelyTypo(), Modularize::ModularizeUtilities::loadAllHeaderListsAndDependencies(), loadModuleDescriptions(), Modularize::ModularizeUtilities::loadProblemHeaderList(), Modularize::ModularizeUtilities::loadSingleHeaderListsAndDependencies(), clang::doc::serialize::parseEnumerators(), replaceDotDot(), clang::clangd::Tweak::Effect::showMessage(), clang::clangd::IncludeFixer::unresolvedNameRecorder(), clang::doc::serialize::ClangDocCommentVisitor::visitBlockCommandComment(), clang::tidy::readability::FindUsageOfThis::VisitCXXThisExpr(), clang::doc::serialize::ClangDocCommentVisitor::visitHTMLStartTagComment(), and clang::doc::serialize::ClangDocCommentVisitor::visitInlineCommandComment().

## ◆ IsFixitSupported

bool IsFixitSupported = false

Definition at line 100 of file AvoidBindCheck.cpp.

## ◆ IsUsed

bool IsUsed = false

Definition at line 79 of file AvoidBindCheck.cpp.

## ◆ Kind

BindArgumentKind Kind = BK_Other

Definition at line 57 of file AvoidBindCheck.cpp.

Referenced by EntityMap::add(), clang::tidy::utils::IncludeSorter::AddInclude(), clang::clangd::adjustKindToCapability(), llvm::yaml::NormalizedRefKind::denormalize(), llvm::yaml::NormalizedSymbolRole::denormalize(), llvm::yaml::NormalizedRefKind::NormalizedRefKind(), llvm::yaml::NormalizedSymbolRole::NormalizedSymbolRole(), clang::move::ClangMoveTool::onEndOfTranslationUnit(), clang::doc::CommentInfo::operator<(), clang::doc::CommentInfo::operator==(), and clang::clangd::sym().

## ◆ Materialization

CallableMaterializationKind Materialization = CMK_Other

Definition at line 87 of file AvoidBindCheck.cpp.

## ◆ PlaceHolderIndex

size_t PlaceHolderIndex = 0

Definition at line 76 of file AvoidBindCheck.cpp.

## ◆ SourceTokens

StringRef SourceTokens

Definition at line 64 of file AvoidBindCheck.cpp.

## ◆ Type

CallableType Type = CT_Other

Definition at line 86 of file AvoidBindCheck.cpp.

## ◆ UsageIdentifier

std::string UsageIdentifier

Definition at line 73 of file AvoidBindCheck.cpp.