Home
last modified time | relevance | path

Searched refs:Bop (Results 1 – 10 of 10) sorted by relevance

/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DMisplacedWideningCastCheck.cpp58 if (const auto *Bop = dyn_cast<BinaryOperator>(E)) { in getMaxCalculationWidth() local
59 unsigned LHSWidth = getMaxCalculationWidth(Context, Bop->getLHS()); in getMaxCalculationWidth()
60 unsigned RHSWidth = getMaxCalculationWidth(Context, Bop->getRHS()); in getMaxCalculationWidth()
61 if (Bop->getOpcode() == BO_Mul) in getMaxCalculationWidth()
63 if (Bop->getOpcode() == BO_Add) in getMaxCalculationWidth()
65 if (Bop->getOpcode() == BO_Rem) { in getMaxCalculationWidth()
67 if (Bop->getRHS()->EvaluateAsInt(Result, Context)) in getMaxCalculationWidth()
69 } else if (Bop->getOpcode() == BO_Shl) { in getMaxCalculationWidth()
71 if (Bop->getRHS()->EvaluateAsInt(Result, Context)) { in getMaxCalculationWidth()
/external/llvm-project/clang/lib/ARCMigrate/
DTransRetainReleaseDealloc.cpp225 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(S)) { in isPlusOneAssignToVar() local
226 return (RefD == getReferencedDecl(Bop->getLHS())) && isPlusOneAssign(Bop); in isPlusOneAssignToVar()
/external/clang/lib/ARCMigrate/
DTransRetainReleaseDealloc.cpp221 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(S)) { in isPlusOneAssignToVar() local
222 return (RefD == getReferencedDecl(Bop->getLHS())) && isPlusOneAssign(Bop); in isPlusOneAssignToVar()
/external/clang/lib/Analysis/
DCFG.cpp869 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(S)) { in tryEvaluateBool() local
870 if (Bop->isLogicalOp()) { in tryEvaluateBool()
882 switch (Bop->getOpcode()) { in tryEvaluateBool()
891 if (Bop->getLHS()->EvaluateAsInt(IntVal, *Context)) { in tryEvaluateBool()
896 if (Bop->getRHS()->EvaluateAsInt(IntVal, *Context)) { in tryEvaluateBool()
912 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(E)) { in evaluateAsBooleanConditionNoCache() local
913 if (Bop->isLogicalOp()) { in evaluateAsBooleanConditionNoCache()
914 TryResult LHS = tryEvaluateBool(Bop->getLHS()); in evaluateAsBooleanConditionNoCache()
918 if (LHS.isTrue() == (Bop->getOpcode() == BO_LOr)) in evaluateAsBooleanConditionNoCache()
921 TryResult RHS = tryEvaluateBool(Bop->getRHS()); in evaluateAsBooleanConditionNoCache()
[all …]
/external/llvm-project/clang/lib/Analysis/
DCFG.cpp1182 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(S)) { in tryEvaluateBool() local
1183 if (Bop->isLogicalOp() || Bop->isEqualityOp()) { in tryEvaluateBool()
1195 switch (Bop->getOpcode()) { in tryEvaluateBool()
1204 if (Bop->getLHS()->EvaluateAsInt(LHSResult, *Context)) { in tryEvaluateBool()
1211 if (Bop->getRHS()->EvaluateAsInt(RHSResult, *Context)) { in tryEvaluateBool()
1228 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(E)) { in evaluateAsBooleanConditionNoCache() local
1229 if (Bop->isLogicalOp()) { in evaluateAsBooleanConditionNoCache()
1230 TryResult LHS = tryEvaluateBool(Bop->getLHS()); in evaluateAsBooleanConditionNoCache()
1234 if (LHS.isTrue() == (Bop->getOpcode() == BO_LOr)) in evaluateAsBooleanConditionNoCache()
1237 TryResult RHS = tryEvaluateBool(Bop->getRHS()); in evaluateAsBooleanConditionNoCache()
[all …]
/external/clang/lib/Sema/
DSemaExpr.cpp11032 BinaryOperator *Bop) { in EmitDiagnosticForLogicalAndInLogicalOr() argument
11033 assert(Bop->getOpcode() == BO_LAnd); in EmitDiagnosticForLogicalAndInLogicalOr()
11034 Self.Diag(Bop->getOperatorLoc(), diag::warn_logical_and_in_logical_or) in EmitDiagnosticForLogicalAndInLogicalOr()
11035 << Bop->getSourceRange() << OpLoc; in EmitDiagnosticForLogicalAndInLogicalOr()
11036 SuggestParentheses(Self, Bop->getOperatorLoc(), in EmitDiagnosticForLogicalAndInLogicalOr()
11038 << Bop->getOpcodeStr(), in EmitDiagnosticForLogicalAndInLogicalOr()
11039 Bop->getSourceRange()); in EmitDiagnosticForLogicalAndInLogicalOr()
11061 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) { in DiagnoseLogicalAndInLogicalOrLHS() local
11062 if (Bop->getOpcode() == BO_LAnd) { in DiagnoseLogicalAndInLogicalOrLHS()
11067 if (!EvaluatesAsTrue(S, Bop->getLHS())) in DiagnoseLogicalAndInLogicalOrLHS()
[all …]
/external/llvm/lib/IR/
DInstructions.cpp2234 if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V)) in isNeg() local
2235 if (Bop->getOpcode() == Instruction::Sub) in isNeg()
2236 if (Constant *C = dyn_cast<Constant>(Bop->getOperand(0))) in isNeg()
2242 if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V)) in isFNeg() local
2243 if (Bop->getOpcode() == Instruction::FSub) in isFNeg()
2244 if (Constant *C = dyn_cast<Constant>(Bop->getOperand(0))) { in isFNeg()
2253 if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V)) in isNot() local
2254 return (Bop->getOpcode() == Instruction::Xor && in isNot()
2255 (isConstantAllOnes(Bop->getOperand(1)) || in isNot()
2256 isConstantAllOnes(Bop->getOperand(0)))); in isNot()
/external/llvm-project/clang/lib/Sema/
DSemaExpr.cpp14156 BinaryOperator *Bop) { in EmitDiagnosticForLogicalAndInLogicalOr() argument
14157 assert(Bop->getOpcode() == BO_LAnd); in EmitDiagnosticForLogicalAndInLogicalOr()
14158 Self.Diag(Bop->getOperatorLoc(), diag::warn_logical_and_in_logical_or) in EmitDiagnosticForLogicalAndInLogicalOr()
14159 << Bop->getSourceRange() << OpLoc; in EmitDiagnosticForLogicalAndInLogicalOr()
14160 SuggestParentheses(Self, Bop->getOperatorLoc(), in EmitDiagnosticForLogicalAndInLogicalOr()
14162 << Bop->getOpcodeStr(), in EmitDiagnosticForLogicalAndInLogicalOr()
14163 Bop->getSourceRange()); in EmitDiagnosticForLogicalAndInLogicalOr()
14185 if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(LHSExpr)) { in DiagnoseLogicalAndInLogicalOrLHS() local
14186 if (Bop->getOpcode() == BO_LAnd) { in DiagnoseLogicalAndInLogicalOrLHS()
14191 if (!EvaluatesAsTrue(S, Bop->getLHS())) in DiagnoseLogicalAndInLogicalOrLHS()
[all …]
/external/clang/lib/AST/
DExprConstant.cpp7419 if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(job.E)) { in process() local
7420 if (shouldEnqueue(Bop)) { in process()
7422 enqueue(Bop->getLHS()); in process()
7433 const BinaryOperator *Bop = cast<BinaryOperator>(job.E); in process() local
7435 if (!VisitBinOpLHSOnly(Result, Bop, SuppressRHSDiags)) { in process()
7443 enqueue(Bop->getRHS()); in process()
7448 const BinaryOperator *Bop = cast<BinaryOperator>(job.E); in process() local
7451 Result.Failed = !VisitBinOp(job.LHSResult, RHS, Bop, Result.Val); in process()
/external/llvm-project/clang/lib/AST/
DExprConstant.cpp12410 if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(job.E)) { in process() local
12411 if (shouldEnqueue(Bop)) { in process()
12413 enqueue(Bop->getLHS()); in process()
12424 const BinaryOperator *Bop = cast<BinaryOperator>(job.E); in process() local
12426 if (!VisitBinOpLHSOnly(Result, Bop, SuppressRHSDiags)) { in process()
12434 enqueue(Bop->getRHS()); in process()
12439 const BinaryOperator *Bop = cast<BinaryOperator>(job.E); in process() local
12442 Result.Failed = !VisitBinOp(job.LHSResult, RHS, Bop, Result.Val); in process()