clang-tools 6.0.0

Namespaces | Functions | Variables
RedundantExpressionCheck.cpp File Reference
`#include "RedundantExpressionCheck.h"`
`#include "../utils/Matchers.h"`
`#include "../utils/OptionsUtils.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/ASTMatchers/ASTMatchFinder.h"`
`#include "clang/Basic/LLVM.h"`
`#include "clang/Basic/SourceLocation.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Lex/Lexer.h"`
`#include "llvm/ADT/APInt.h"`
`#include "llvm/ADT/APSInt.h"`
`#include "llvm/ADT/FoldingSet.h"`
`#include "llvm/Support/Casting.h"`
`#include <algorithm>`
`#include <cassert>`
`#include <cmath>`
`#include <cstdint>`
`#include <string>`
`#include <vector>`
Include dependency graph for RedundantExpressionCheck.cpp:

Go to the source code of this file.

## Namespaces
| clang
| clang::tidy
| clang::tidy::misc

## Functions
static bool | clang::tidy::misc::incrementWithoutOverflow (const APSInt &Value, APSInt &Result)
static bool | clang::tidy::misc::areEquivalentNameSpecifier (const NestedNameSpecifier *Left, const NestedNameSpecifier *Right)
static bool | clang::tidy::misc::areEquivalentExpr (const Expr *Left, const Expr *Right)
static bool | clang::tidy::misc::areEquivalentRanges (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static bool | clang::tidy::misc::areExclusiveRanges (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static bool | clang::tidy::misc::rangesFullyCoverDomain (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static bool | clang::tidy::misc::rangeSubsumesRange (BinaryOperatorKind OpcodeLHS, const APSInt &ValueLHS, BinaryOperatorKind OpcodeRHS, const APSInt &ValueRHS)
static void | clang::tidy::misc::transformSubToCanonicalAddExpr (BinaryOperatorKind &Opcode, APSInt &Value)
| clang::tidy::misc::AST_MATCHER (Expr, isIntegerConstantExpr)
| clang::tidy::misc::AST_MATCHER (BinaryOperator, operandsAreEquivalent)
| clang::tidy::misc::AST_MATCHER (ConditionalOperator, expressionsAreEquivalent)
| clang::tidy::misc::AST_MATCHER (CallExpr, parametersAreEquivalent)
| clang::tidy::misc::AST_MATCHER (BinaryOperator, binaryOperatorIsInMacro)
| clang::tidy::misc::AST_MATCHER (ConditionalOperator, conditionalOperatorIsInMacro)
| clang::tidy::misc::AST_MATCHER (Expr, isMacro)
| clang::tidy::misc::AST_MATCHER_P (Expr, expandedByMacro, llvm::StringSet<>, Names)
static ast_matchers::internal::Matcher< Expr > | clang::tidy::misc::matchIntegerConstantExpr (StringRef Id)
static bool | clang::tidy::misc::retrieveIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, APSInt &Value, const Expr *&ConstExpr)
static bool | clang::tidy::misc::retrieveIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, APSInt &Value)
static ast_matchers::internal::Matcher< Expr > | clang::tidy::misc::matchSymbolicExpr (StringRef Id)
static bool | clang::tidy::misc::retrieveSymbolicExpr (const MatchFinder::MatchResult &Result, StringRef Id, const Expr *&SymExpr)
static ast_matchers::internal::Matcher< Expr > | clang::tidy::misc::matchBinOpIntegerConstantExpr (StringRef Id)
static bool | clang::tidy::misc::retrieveBinOpIntegerConstantExpr (const MatchFinder::MatchResult &Result, StringRef Id, BinaryOperatorKind &Opcode, const Expr *&Symbol, APSInt &Value)
static ast_matchers::internal::Matcher< Expr > | clang::tidy::misc::matchRelationalIntegerConstantExpr (StringRef Id)
static bool | clang::tidy::misc::isNonConstReferenceType (QualType ParamType)
static bool | clang::tidy::misc::canOverloadedOperatorArgsBeModified (const FunctionDecl *OperatorDecl, bool checkSecondParam)
static 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 bool | clang::tidy::misc::areSidesBinaryConstExpressions (const BinaryOperator *&BinOp, const ASTContext *AstCtx)
static bool | clang::tidy::misc::retrieveConstExprFromBothSides (const BinaryOperator *&BinOp, BinaryOperatorKind &MainOpcode, BinaryOperatorKind &SideOpcode, const Expr *&LhsConst, const Expr *&RhsConst, const ASTContext *AstCtx)
static bool | clang::tidy::misc::areExprsFromDifferentMacros (const Expr *LhsExpr, const Expr *RhsExpr, const ASTContext *AstCtx)
static bool | clang::tidy::misc::areExprsMacroAndNonMacro (const Expr *&LhsExpr, const Expr *&RhsExpr)
static bool | clang::tidy::misc::exprEvaluatesToZero (BinaryOperatorKind Opcode, APSInt Value)
static bool | clang::tidy::misc::exprEvaluatesToBitwiseNegatedZero (BinaryOperatorKind Opcode, APSInt Value)
static bool | clang::tidy::misc::exprEvaluatesToSymbolic (BinaryOperatorKind Opcode, APSInt Value)

## Variables
static const llvm::StringSet | clang::tidy::misc::KnownBannedMacroNames