clang-tools  7.0.0svn
Classes | Functions
clang::tidy::misc Namespace Reference

Classes

class  DefinitionsInHeadersCheck
 Finds non-extern non-inline function and variable definitions in header files, which can lead to potential ODR violations. More...
 
class  MiscModule
 
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  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...
 

Functions

static QualType guessAlternateQualification (ASTContext &Context, QualType QT)
 
static bool exprEvaluatesToZero (BinaryOperatorKind Opcode, APSInt Value)
 
static bool exprEvaluatesToBitwiseNegatedZero (BinaryOperatorKind Opcode, APSInt Value)
 
static bool exprEvaluatesToSymbolic (BinaryOperatorKind Opcode, APSInt Value)
 
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)
 

Function Documentation

◆ exprEvaluatesToBitwiseNegatedZero()

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

Definition at line 823 of file RedundantExpressionCheck.cpp.

Referenced by exprEvaluatesToSymbolic().

◆ exprEvaluatesToSymbolic()

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

◆ exprEvaluatesToZero()

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

Definition at line 819 of file RedundantExpressionCheck.cpp.

Referenced by exprEvaluatesToSymbolic().

◆ guessAlternateQualification()

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

◆ removeArgument()

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

Definition at line 66 of file UnusedParametersCheck.cpp.

References removeNode().

◆ removeNode()

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

Definition at line 40 of file UnusedParametersCheck.cpp.

Referenced by removeArgument(), and removeParameter().

◆ removeParameter()

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

Definition at line 57 of file UnusedParametersCheck.cpp.

References removeNode().

◆ ShouldCheckDecl()

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

Definition at line 24 of file UnusedUsingDeclsCheck.cpp.