clang-tools 22.0.0git
clang::tidy::misc Namespace Reference

Classes

class  ConfusableIdentifierCheck
 Finds symbol which have confusable identifiers, i.e. More...
class  ConstCorrectnessCheck
 This check warns on variables which could be declared const but are not. More...
class  CoroutineHostileRAIICheck
 Detects when objects of certain hostile RAII types persists across suspension points in a coroutine. More...
class  DefinitionsInHeadersCheck
 Finds non-extern non-inline function and variable definitions in header files, which can lead to potential ODR violations. More...
class  HeaderIncludeCycleCheck
 Check detects cyclic #include dependencies between user-defined headers. More...
class  IncludeCleanerCheck
 Checks for unused and missing includes. More...
class  MiscModule
class  MisleadingBidirectionalCheck
class  MisleadingIdentifierCheck
class  MisplacedConstCheck
 This check diagnoses when a const qualifier is applied to a typedef to a pointer type rather than to the pointee. More...
class  NewDeleteOverloadsCheck
class  NonCopyableObjectsCheck
 The check flags dereferences and non-pointer declarations of objects that are not meant to be passed by value, such as C FILE objects. More...
class  NonPrivateMemberVariablesInClassesCheck
 This checker finds classes that not only contain the data (non-static member variables), but also have logic (non-static member functions), and diagnoses all member variables that have any other scope other than private. More...
class  NoRecursionCheck
 Finds strongly connected functions (by analyzing call graph for SCC's that are loops), diagnoses each function in the cycle, and displays one example of possible call graph loop (recursion). More...
class  OverrideWithDifferentVisibilityCheck
 Finds virtual function overrides with different visibility than the function in the base class. More...
class  RedundantExpressionCheck
 The checker detects expressions that are redundant, because they contain ineffective, useless parts. More...
class  StaticAssertCheck
 Replaces assert() with static_assert() if the condition is evaluatable at compile time. More...
class  ThrowByValueCatchByReferenceCheck
 Checks for locations that do not throw by value. More...
class  UnconventionalAssignOperatorCheck
 Finds declarations of assignment operators with the wrong return and/or argument types and definitions with good return type but wrong return statements. More...
class  UniqueptrResetReleaseCheck
 Find and replace unique_ptr::reset(release()) with std::move(). More...
class  UnusedAliasDeclsCheck
 Finds unused namespace alias declarations. More...
class  UnusedParametersCheck
 Finds unused parameters and fixes them, so that -Wunused-parameter can be turned on. More...
class  UnusedUsingDeclsCheck
 Finds unused using declarations. More...
class  UseAnonymousNamespaceCheck
 Warns when using 'static' functions or variables at global scope, and suggests moving them to an anonymous namespace. More...
class  UseInternalLinkageCheck
 Detects variables and functions that can be marked as static or moved into an anonymous namespace to enforce internal linkage. More...

Typedefs

using DeclsWithinContextMap

Enumerations

enum class  VariableCategory { Value , Reference , Pointer }
 Classify for a variable in what the Const-Check is interested. More...

Functions

static llvm::SmallString< 64U > skeleton (StringRef Name)
static bool addToContext (DeclsWithinContextMap &DeclsWithinContext, const Decl *Context, Entry E)
static void addToEnclosingContexts (DeclsWithinContextMap &DeclsWithinContext, const Decl *Parent, const NamedDecl *ND)
static auto typeWithNameIn (const std::vector< StringRef > &Names)
static bool isUnassignedAL (llvm::UTF32 CP)
static bool isUnassignedR (llvm::UTF32 CP)
static bool isR (llvm::UTF32 CP)
static bool hasRTLCharacters (StringRef Buffer)
static QualType guessAlternateQualification (ASTContext &Context, QualType QT)
static OverloadedOperatorKind getCorrespondingOverload (const FunctionDecl *FD)
static const char * getOperatorName (OverloadedOperatorKind K)
static bool areCorrespondingOverloads (const FunctionDecl *LHS, const FunctionDecl *RHS)
static bool hasCorrespondingOverloadInBaseClass (const CXXMethodDecl *MD, const CXXRecordDecl *RD=nullptr)
static CallStackTy pathfindSomeCycle (ArrayRef< CallGraphNode * > SCC)
static bool incrementWithoutOverflow (const APSInt &Value, APSInt &Result)
static bool areEquivalentExpr (const Expr *Left, const Expr *Right)
static bool areEquivalentRanges (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static bool areExclusiveRanges (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static bool rangesFullyCoverDomain (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static bool rangeSubsumesRange (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static void transformSubToCanonicalAddExpr (BinaryOperatorKind &Opcode, APSInt &Value)
static OverloadedOperatorKind getOp (const BinaryOperator *Op)
static OverloadedOperatorKind getOp (const CXXOperatorCallExpr *Op)
static std::pair< const Expr *, const Expr * > getOperands (const BinaryOperator *Op)
static std::pair< const Expr *, const Expr * > getOperands (const CXXOperatorCallExpr *Op)
template<typename TExpr>
static const TExpr * checkOpKind (const Expr *TheExpr, OverloadedOperatorKind OpKind)
template<typename TExpr, unsigned N>
static bool collectOperands (const Expr *Part, SmallVector< const Expr *, N > &AllOperands, OverloadedOperatorKind OpKind)
template<typename TExpr>
static bool hasSameOperatorParent (const Expr *TheExpr, OverloadedOperatorKind OpKind, ASTContext &Context)
template<typename TExpr>
static bool markDuplicateOperands (const TExpr *TheExpr, ast_matchers::internal::BoundNodesTreeBuilder *Builder, ASTContext &Context)
static ast_matchers::internal::Matcher< Expr > matchIntegerConstantExpr (StringRef Id)
static bool retrieveIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, APSInt &Value, const Expr *&ConstExpr)
static bool retrieveIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, APSInt &Value)
static ast_matchers::internal::Matcher< Expr > matchSymbolicExpr (StringRef Id)
static bool retrieveSymbolicExpr (const MatchFinder::MatchResult &Result, StringRef Id, const Expr *&SymExpr)
static ast_matchers::internal::Matcher< Expr > matchBinOpIntegerConstantExpr (StringRef Id)
static bool retrieveBinOpIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, BinaryOperatorKind &Opcode, const Expr *&Symbol, APSInt &Value)
static ast_matchers::internal::Matcher< Expr > matchRelationalIntegerConstantExpr (StringRef Id)
static bool isNonConstReferenceType (QualType ParamType)
static bool canOverloadedOperatorArgsBeModified (const CXXOperatorCallExpr *OperatorCall, bool CheckSecondParam)
static bool retrieveRelationalIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, const Expr *&OperandExpr, BinaryOperatorKind &Opcode, const Expr *&Symbol, APSInt &Value, const Expr *&ConstExpr)
static bool areSidesBinaryConstExpressions (const BinaryOperator *&BinOp, const ASTContext *AstCtx)
static bool areSidesBinaryConstExpressionsOrDefinesOrIntegerConstant (const BinaryOperator *&BinOp, const ASTContext *AstCtx)
static bool retrieveConstExprFromBothSides (const BinaryOperator *&BinOp, BinaryOperatorKind &MainOpcode, BinaryOperatorKind &SideOpcode, const Expr *&LhsConst, const Expr *&RhsConst, const ASTContext *AstCtx)
static bool isSameRawIdentifierToken (const Token &T1, const Token &T2, const SourceManager &SM)
static bool isTokAtEndOfExpr (SourceRange ExprSR, Token T, const SourceManager &SM)
static bool areExprsFromDifferentMacros (const Expr *LhsExpr, const Expr *RhsExpr, const ASTContext *AstCtx)
 Returns true if both LhsExpr and RhsExpr are macro expressions and they are expanded from different macros.
static bool areExprsMacroAndNonMacro (const Expr *&LhsExpr, const Expr *&RhsExpr)
static bool areStringsSameIgnoreSpaces (const llvm::StringRef Left, const llvm::StringRef Right)
static bool areExprsSameMacroOrLiteral (const BinaryOperator *BinOp, const ASTContext *Context)
static bool exprEvaluatesToZero (BinaryOperatorKind Opcode, APSInt Value)
static bool exprEvaluatesToBitwiseNegatedZero (BinaryOperatorKind Opcode, APSInt Value)
static bool exprEvaluatesToSymbolic (BinaryOperatorKind Opcode, APSInt Value)
static const Type * getDeleterForUniquePtr (const MatchFinder::MatchResult &Result, StringRef ID)
static bool areDeletersCompatible (const MatchFinder::MatchResult &Result)
static bool isOverrideMethod (const FunctionDecl *Function)
static bool hasAttrAfterParam (const SourceManager *SourceManager, const ParmVarDecl *Param)
template<typename T>
static CharSourceRange removeNode (const MatchFinder::MatchResult &Result, const T *PrevNode, const T *Node, const T *NextNode)
static FixItHint removeParameter (const MatchFinder::MatchResult &Result, const FunctionDecl *Function, unsigned Index)
static FixItHint removeArgument (const MatchFinder::MatchResult &Result, const CallExpr *Call, unsigned Index)
static bool shouldCheckDecl (const Decl *TargetDecl)

Variables

static constexpr llvm::StringLiteral KnownBannedMacroNames []
static constexpr StringRef Message

Typedef Documentation

◆ DeclsWithinContextMap

Initial value:
llvm::DenseMap<const Decl *, llvm::SmallVector<Entry, 1>>

Definition at line 104 of file ConfusableIdentifierCheck.cpp.

Enumeration Type Documentation

◆ VariableCategory

Classify for a variable in what the Const-Check is interested.

Enumerator
Value 
Reference 
Pointer 

Definition at line 141 of file ConstCorrectnessCheck.cpp.

Function Documentation

◆ addToContext()

bool clang::tidy::misc::addToContext ( DeclsWithinContextMap & DeclsWithinContext,
const Decl * Context,
Entry E )
static

Definition at line 107 of file ConfusableIdentifierCheck.cpp.

Referenced by addToEnclosingContexts().

◆ addToEnclosingContexts()

void clang::tidy::misc::addToEnclosingContexts ( DeclsWithinContextMap & DeclsWithinContext,
const Decl * Parent,
const NamedDecl * ND )
static

◆ areCorrespondingOverloads()

bool clang::tidy::misc::areCorrespondingOverloads ( const FunctionDecl * LHS,
const FunctionDecl * RHS )
static

◆ areDeletersCompatible()

bool clang::tidy::misc::areDeletersCompatible ( const MatchFinder::MatchResult & Result)
static

◆ areEquivalentExpr()

bool clang::tidy::misc::areEquivalentExpr ( const Expr * Left,
const Expr * Right )
static

◆ areEquivalentRanges()

bool clang::tidy::misc::areEquivalentRanges ( BinaryOperatorKind OpcodeLHS,
const APSInt & ValueLHS,
BinaryOperatorKind OpcodeRHS,
const APSInt & ValueRHS )
static

Definition at line 144 of file RedundantExpressionCheck.cpp.

References incrementWithoutOverflow().

◆ areExclusiveRanges()

bool clang::tidy::misc::areExclusiveRanges ( BinaryOperatorKind OpcodeLHS,
const APSInt & ValueLHS,
BinaryOperatorKind OpcodeRHS,
const APSInt & ValueRHS )
static

Definition at line 164 of file RedundantExpressionCheck.cpp.

References incrementWithoutOverflow().

◆ areExprsFromDifferentMacros()

bool clang::tidy::misc::areExprsFromDifferentMacros ( const Expr * LhsExpr,
const Expr * RhsExpr,
const ASTContext * AstCtx )
static

Returns true if both LhsExpr and RhsExpr are macro expressions and they are expanded from different macros.

Definition at line 819 of file RedundantExpressionCheck.cpp.

References isSameRawIdentifierToken(), and isTokAtEndOfExpr().

Referenced by clang::tidy::misc::RedundantExpressionCheck::check().

◆ areExprsMacroAndNonMacro()

bool clang::tidy::misc::areExprsMacroAndNonMacro ( const Expr *& LhsExpr,
const Expr *& RhsExpr )
static

◆ areExprsSameMacroOrLiteral()

bool clang::tidy::misc::areExprsSameMacroOrLiteral ( const BinaryOperator * BinOp,
const ASTContext * Context )
static

◆ areSidesBinaryConstExpressions()

bool clang::tidy::misc::areSidesBinaryConstExpressions ( const BinaryOperator *& BinOp,
const ASTContext * AstCtx )
static

◆ areSidesBinaryConstExpressionsOrDefinesOrIntegerConstant()

bool clang::tidy::misc::areSidesBinaryConstExpressionsOrDefinesOrIntegerConstant ( const BinaryOperator *& BinOp,
const ASTContext * AstCtx )
static

◆ areStringsSameIgnoreSpaces()

bool clang::tidy::misc::areStringsSameIgnoreSpaces ( const llvm::StringRef Left,
const llvm::StringRef Right )
static

Definition at line 869 of file RedundantExpressionCheck.cpp.

Referenced by areExprsSameMacroOrLiteral().

◆ canOverloadedOperatorArgsBeModified()

bool clang::tidy::misc::canOverloadedOperatorArgsBeModified ( const CXXOperatorCallExpr * OperatorCall,
bool CheckSecondParam )
static

◆ checkOpKind()

template<typename TExpr>
const TExpr * clang::tidy::misc::checkOpKind ( const Expr * TheExpr,
OverloadedOperatorKind OpKind )
static

Definition at line 322 of file RedundantExpressionCheck.cpp.

References getOp().

Referenced by collectOperands(), hasSameOperatorParent(), and markDuplicateOperands().

◆ collectOperands()

template<typename TExpr, unsigned N>
bool clang::tidy::misc::collectOperands ( const Expr * Part,
SmallVector< const Expr *, N > & AllOperands,
OverloadedOperatorKind OpKind )
static

◆ exprEvaluatesToBitwiseNegatedZero()

bool clang::tidy::misc::exprEvaluatesToBitwiseNegatedZero ( BinaryOperatorKind Opcode,
APSInt Value )
static

Definition at line 1154 of file RedundantExpressionCheck.cpp.

References Value.

◆ exprEvaluatesToSymbolic()

bool clang::tidy::misc::exprEvaluatesToSymbolic ( BinaryOperatorKind Opcode,
APSInt Value )
static

Definition at line 1159 of file RedundantExpressionCheck.cpp.

References Value.

◆ exprEvaluatesToZero()

bool clang::tidy::misc::exprEvaluatesToZero ( BinaryOperatorKind Opcode,
APSInt Value )
static

Definition at line 1150 of file RedundantExpressionCheck.cpp.

References Value.

◆ getCorrespondingOverload()

OverloadedOperatorKind clang::tidy::misc::getCorrespondingOverload ( const FunctionDecl * FD)
static

◆ getDeleterForUniquePtr()

const Type * clang::tidy::misc::getDeleterForUniquePtr ( const MatchFinder::MatchResult & Result,
StringRef ID )
static

Definition at line 57 of file UniqueptrResetReleaseCheck.cpp.

Referenced by areDeletersCompatible().

◆ getOp() [1/2]

OverloadedOperatorKind clang::tidy::misc::getOp ( const BinaryOperator * Op)
static

Definition at line 299 of file RedundantExpressionCheck.cpp.

Referenced by checkOpKind(), and markDuplicateOperands().

◆ getOp() [2/2]

OverloadedOperatorKind clang::tidy::misc::getOp ( const CXXOperatorCallExpr * Op)
static

Definition at line 303 of file RedundantExpressionCheck.cpp.

◆ getOperands() [1/2]

std::pair< const Expr *, const Expr * > clang::tidy::misc::getOperands ( const BinaryOperator * Op)
static

Definition at line 310 of file RedundantExpressionCheck.cpp.

Referenced by collectOperands(), and markDuplicateOperands().

◆ getOperands() [2/2]

std::pair< const Expr *, const Expr * > clang::tidy::misc::getOperands ( const CXXOperatorCallExpr * Op)
static

Definition at line 316 of file RedundantExpressionCheck.cpp.

◆ getOperatorName()

const char * clang::tidy::misc::getOperatorName ( OverloadedOperatorKind K)
static

◆ guessAlternateQualification()

QualType clang::tidy::misc::guessAlternateQualification ( ASTContext & Context,
QualType QT )
static

◆ hasAttrAfterParam()

bool clang::tidy::misc::hasAttrAfterParam ( const SourceManager * SourceManager,
const ParmVarDecl * Param )
static

◆ hasCorrespondingOverloadInBaseClass()

bool clang::tidy::misc::hasCorrespondingOverloadInBaseClass ( const CXXMethodDecl * MD,
const CXXRecordDecl * RD = nullptr )
static

◆ hasRTLCharacters()

bool clang::tidy::misc::hasRTLCharacters ( StringRef Buffer)
static

◆ hasSameOperatorParent()

template<typename TExpr>
bool clang::tidy::misc::hasSameOperatorParent ( const Expr * TheExpr,
OverloadedOperatorKind OpKind,
ASTContext & Context )
static

◆ incrementWithoutOverflow()

bool clang::tidy::misc::incrementWithoutOverflow ( const APSInt & Value,
APSInt & Result )
static

Definition at line 41 of file RedundantExpressionCheck.cpp.

References Value.

Referenced by areEquivalentRanges(), areExclusiveRanges(), and rangesFullyCoverDomain().

◆ isNonConstReferenceType()

bool clang::tidy::misc::isNonConstReferenceType ( QualType ParamType)
static

Definition at line 607 of file RedundantExpressionCheck.cpp.

Referenced by canOverloadedOperatorArgsBeModified().

◆ isOverrideMethod()

bool clang::tidy::misc::isOverrideMethod ( const FunctionDecl * Function)
static

Definition at line 25 of file UnusedParametersCheck.cpp.

◆ isR()

bool clang::tidy::misc::isR ( llvm::UTF32 CP)
static

Definition at line 41 of file MisleadingIdentifier.cpp.

Referenced by hasRTLCharacters().

◆ isSameRawIdentifierToken()

bool clang::tidy::misc::isSameRawIdentifierToken ( const Token & T1,
const Token & T2,
const SourceManager & SM )
static

Definition at line 799 of file RedundantExpressionCheck.cpp.

Referenced by areExprsFromDifferentMacros().

◆ isTokAtEndOfExpr()

bool clang::tidy::misc::isTokAtEndOfExpr ( SourceRange ExprSR,
Token T,
const SourceManager & SM )
static

Definition at line 811 of file RedundantExpressionCheck.cpp.

Referenced by areExprsFromDifferentMacros().

◆ isUnassignedAL()

bool clang::tidy::misc::isUnassignedAL ( llvm::UTF32 CP)
static

Definition at line 16 of file MisleadingIdentifier.cpp.

Referenced by hasRTLCharacters().

◆ isUnassignedR()

bool clang::tidy::misc::isUnassignedR ( llvm::UTF32 CP)
static

Definition at line 28 of file MisleadingIdentifier.cpp.

Referenced by hasRTLCharacters().

◆ markDuplicateOperands()

template<typename TExpr>
bool clang::tidy::misc::markDuplicateOperands ( const TExpr * TheExpr,
ast_matchers::internal::BoundNodesTreeBuilder * Builder,
ASTContext & Context )
static

◆ matchBinOpIntegerConstantExpr()

ast_matchers::internal::Matcher< Expr > clang::tidy::misc::matchBinOpIntegerConstantExpr ( StringRef Id)
static

◆ matchIntegerConstantExpr()

ast_matchers::internal::Matcher< Expr > clang::tidy::misc::matchIntegerConstantExpr ( StringRef Id)
static

◆ matchRelationalIntegerConstantExpr()

ast_matchers::internal::Matcher< Expr > clang::tidy::misc::matchRelationalIntegerConstantExpr ( StringRef Id)
static

◆ matchSymbolicExpr()

ast_matchers::internal::Matcher< Expr > clang::tidy::misc::matchSymbolicExpr ( StringRef Id)
static

◆ pathfindSomeCycle()

CallStackTy clang::tidy::misc::pathfindSomeCycle ( ArrayRef< CallGraphNode * > SCC)
static

Definition at line 159 of file NoRecursionCheck.cpp.

◆ rangesFullyCoverDomain()

bool clang::tidy::misc::rangesFullyCoverDomain ( BinaryOperatorKind OpcodeLHS,
const APSInt & ValueLHS,
BinaryOperatorKind OpcodeRHS,
const APSInt & ValueRHS )
static

Definition at line 208 of file RedundantExpressionCheck.cpp.

References incrementWithoutOverflow().

◆ rangeSubsumesRange()

bool clang::tidy::misc::rangeSubsumesRange ( BinaryOperatorKind OpcodeLHS,
const APSInt & ValueLHS,
BinaryOperatorKind OpcodeRHS,
const APSInt & ValueRHS )
static

Definition at line 255 of file RedundantExpressionCheck.cpp.

◆ removeArgument()

FixItHint clang::tidy::misc::removeArgument ( const MatchFinder::MatchResult & Result,
const CallExpr * Call,
unsigned Index )
static

Definition at line 77 of file UnusedParametersCheck.cpp.

References removeNode().

◆ removeNode()

template<typename T>
CharSourceRange clang::tidy::misc::removeNode ( const MatchFinder::MatchResult & Result,
const T * PrevNode,
const T * Node,
const T * NextNode )
static

Definition at line 51 of file UnusedParametersCheck.cpp.

Referenced by removeArgument(), and removeParameter().

◆ removeParameter()

FixItHint clang::tidy::misc::removeParameter ( const MatchFinder::MatchResult & Result,
const FunctionDecl * Function,
unsigned Index )
static

Definition at line 68 of file UnusedParametersCheck.cpp.

References removeNode().

◆ retrieveBinOpIntegerConstantExpr()

bool clang::tidy::misc::retrieveBinOpIntegerConstantExpr ( const MatchFinder::MatchResult & Result,
StringRef Id,
BinaryOperatorKind & Opcode,
const Expr *& Symbol,
APSInt & Value )
static

◆ retrieveConstExprFromBothSides()

bool clang::tidy::misc::retrieveConstExprFromBothSides ( const BinaryOperator *& BinOp,
BinaryOperatorKind & MainOpcode,
BinaryOperatorKind & SideOpcode,
const Expr *& LhsConst,
const Expr *& RhsConst,
const ASTContext * AstCtx )
static

◆ retrieveIntegerConstantExpr() [1/2]

bool clang::tidy::misc::retrieveIntegerConstantExpr ( const MatchFinder::MatchResult & Result,
StringRef Id,
APSInt & Value )
static

Definition at line 502 of file RedundantExpressionCheck.cpp.

References retrieveIntegerConstantExpr(), and Value.

◆ retrieveIntegerConstantExpr() [2/2]

bool clang::tidy::misc::retrieveIntegerConstantExpr ( const MatchFinder::MatchResult & Result,
StringRef Id,
APSInt & Value,
const Expr *& ConstExpr )
static

◆ retrieveRelationalIntegerConstantExpr()

bool clang::tidy::misc::retrieveRelationalIntegerConstantExpr ( const MatchFinder::MatchResult & Result,
StringRef Id,
const Expr *& OperandExpr,
BinaryOperatorKind & Opcode,
const Expr *& Symbol,
APSInt & Value,
const Expr *& ConstExpr )
static

◆ retrieveSymbolicExpr()

bool clang::tidy::misc::retrieveSymbolicExpr ( const MatchFinder::MatchResult & Result,
StringRef Id,
const Expr *& SymExpr )
static

◆ shouldCheckDecl()

bool clang::tidy::misc::shouldCheckDecl ( const Decl * TargetDecl)
static

◆ skeleton()

llvm::SmallString< 64U > clang::tidy::misc::skeleton ( StringRef Name)
static

◆ transformSubToCanonicalAddExpr()

void clang::tidy::misc::transformSubToCanonicalAddExpr ( BinaryOperatorKind & Opcode,
APSInt & Value )
static

Definition at line 290 of file RedundantExpressionCheck.cpp.

References Value.

◆ typeWithNameIn()

auto clang::tidy::misc::typeWithNameIn ( const std::vector< StringRef > & Names)
static

Variable Documentation

◆ KnownBannedMacroNames

llvm::StringLiteral clang::tidy::misc::KnownBannedMacroNames[]
staticconstexpr
Initial value:
= {
"EAGAIN",
"EWOULDBLOCK",
"SIGCLD",
"SIGCHLD",
}

Definition at line 34 of file RedundantExpressionCheck.cpp.

Referenced by clang::tidy::misc::RedundantExpressionCheck::registerMatchers().

◆ Message

StringRef clang::tidy::misc::Message
staticconstexpr
Initial value:
=
"%0 %1 can be made static or moved into an anonymous namespace "
"to enforce internal linkage"

Definition at line 139 of file UseInternalLinkageCheck.cpp.

Referenced by clang::tidy::misc::RedundantExpressionCheck::check(), and clang::tidy::misc::UseInternalLinkageCheck::check().