clang-tools 17.0.0git
Classes | Functions
clang::tidy::performance Namespace Reference


class  FasterStringFindCheck
 Optimize calls to std::string::find() and friends when the needle passed is a single character string literal. More...
class  ForRangeCopyCheck
 A check that detects copied loop variables and suggests using const references. More...
class  ImplicitConversionInLoopCheck
class  InefficientAlgorithmCheck
 Warns on inefficient use of STL algorithms on associative containers. More...
class  InefficientStringConcatenationCheck
 This check is to warn about the performance overhead arising from concatenating strings, using the operator+, instead of operator+=. More...
class  InefficientVectorOperationCheck
 Finds possible inefficient std::vector operations (e.g. More...
class  MoveConstArgCheck
 Find casts of calculation results to bigger type. More...
class  MoveConstructorInitCheck
 The check flags user-defined move constructors that have a ctor-initializer initializing a member or base class through a copy constructor instead of a move constructor. More...
class  NoAutomaticMoveCheck
 Finds local variables that cannot be automatically moved due to constness. More...
class  NoexceptMoveConstructorCheck
 The check flags user-defined move constructors and assignment operators not marked with noexcept or marked with noexcept(expr) where expr evaluates to false (but is not a false literal itself). More...
class  NoIntToPtrCheck
 Diagnoses every integer to pointer cast. More...
class  PerformanceModule
class  TriviallyDestructibleCheck
 A check that finds classes that would be trivial if not for the defaulted destructors declared out-of-line: struct A: TrivialClass { ~A(); TrivialClass trivial_fields; }; A::~A() = default;. More...
class  TypePromotionInMathFnCheck
 Finds calls to C math library functions with implicit float to double promotions. More...
class  UnnecessaryCopyInitialization
class  UnnecessaryValueParamCheck
 A check that flags value parameters of expensive to copy types that can safely be converted to const references. More...


static bool isNonTrivialImplicitCast (const Stmt *ST)
static bool areTypesCompatible (QualType Left, QualType Right)
static void replaceCallWithArg (const CallExpr *Call, DiagnosticBuilder &Diag, const SourceManager &SM, const LangOptions &LangOpts)
bool IsRValueReferenceParam (const Expr *Invocation, const QualType *InvocationParmType, const Expr *Arg)
static ClangTidyModuleRegistry::Add< PerformanceModuleX ("performance-module", "Adds performance checks.")

Function Documentation

◆ areTypesCompatible()

static bool clang::tidy::performance::areTypesCompatible ( QualType  Left,
QualType  Right 

◆ isNonTrivialImplicitCast()

static bool clang::tidy::performance::isNonTrivialImplicitCast ( const Stmt *  ST)

◆ IsRValueReferenceParam()

bool clang::tidy::performance::IsRValueReferenceParam ( const Expr *  Invocation,
const QualType *  InvocationParmType,
const Expr *  Arg 

◆ replaceCallWithArg()

static void clang::tidy::performance::replaceCallWithArg ( const CallExpr *  Call,
DiagnosticBuilder &  Diag,
const SourceManager &  SM,
const LangOptions &  LangOpts 

◆ X()

static ClangTidyModuleRegistry::Add< PerformanceModule > clang::tidy::performance::X ( "performance-module"  ,
"Adds performance checks."