Home
last modified time | relevance | path

Searched refs:BinaryOperatorKind (Results 1 – 25 of 52) sorted by relevance

123

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DContainerSizeEmptyCheck.cpp216 if (BinCmpTempl->getOpcode() == BinaryOperatorKind::BO_NE) { in check()
222 if (BinCmpRewritten->getOpcode() == BinaryOperatorKind::BO_NE) { in check()
249 if (Value == 1 && (OpCode == BinaryOperatorKind::BO_EQ || in check()
250 OpCode == BinaryOperatorKind::BO_NE)) in check()
261 (OpCode == BinaryOperatorKind::BO_LT && !ContainerIsLHS)) in check()
264 (OpCode == BinaryOperatorKind::BO_GE && !ContainerIsLHS)) in check()
268 if (OpCode == BinaryOperatorKind::BO_NE && Value == 0) in check()
270 if ((OpCode == BinaryOperatorKind::BO_GT || in check()
271 OpCode == BinaryOperatorKind::BO_GE) && in check()
274 if ((OpCode == BinaryOperatorKind::BO_LT || in check()
[all …]
H A DSimplifyBooleanExprCheck.cpp56 static std::pair<BinaryOperatorKind, BinaryOperatorKind> Opposites[] = {
60 const BinaryOperatorKind Opcode = BinOp->getOpcode(); in negatedOperator()
778 static BinaryOperatorKind getDemorganFlippedOperator(BinaryOperatorKind BO) { in getDemorganFlippedOperator()
785 Optional<BinaryOperatorKind> OuterBO);
793 Optional<BinaryOperatorKind> OuterBO, in flipDemorganBinaryOperator()
871 Optional<BinaryOperatorKind> OuterBO) { in flipDemorganSide()
896 BinaryOperatorKind NewOuterBinary, in shouldRemoveParens()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DUndefResultChecker.cpp119 if ((B->getOpcode() == BinaryOperatorKind::BO_Shl || in checkPostStmt()
120 B->getOpcode() == BinaryOperatorKind::BO_Shr) && in checkPostStmt()
123 << ((B->getOpcode() == BinaryOperatorKind::BO_Shl) ? "left" in checkPostStmt()
127 } else if ((B->getOpcode() == BinaryOperatorKind::BO_Shl || in checkPostStmt()
128 B->getOpcode() == BinaryOperatorKind::BO_Shr) && in checkPostStmt()
132 << ((B->getOpcode() == BinaryOperatorKind::BO_Shl) ? "left" in checkPostStmt()
149 } else if (B->getOpcode() == BinaryOperatorKind::BO_Shl && in checkPostStmt()
154 } else if (B->getOpcode() == BinaryOperatorKind::BO_Shl && in checkPostStmt()
H A DIterator.h152 bool isAccessOperator(BinaryOperatorKind OK);
155 bool isDereferenceOperator(BinaryOperatorKind OK);
161 bool isRandomIncrOrDecrOperator(BinaryOperatorKind OK);
H A DIterator.cpp136 bool isAccessOperator(BinaryOperatorKind OK) { in isAccessOperator()
149 bool isDereferenceOperator(BinaryOperatorKind OK) { in isDereferenceOperator()
174 bool isRandomIncrOrDecrOperator(BinaryOperatorKind OK) { in isRandomIncrOrDecrOperator()
H A DMallocOverflowSecurityChecker.cpp62 static inline bool EvaluatesToZero(APSInt &Val, BinaryOperatorKind op) { in EvaluatesToZero()
83 BinaryOperatorKind opc = binop->getOpcode(); in CheckMallocArgument()
H A DInvalidatedIteratorChecker.cpp92 BinaryOperatorKind OK = BO->getOpcode(); in checkPreStmt()
H A DIteratorModeling.cpp161 bool isSimpleComparisonOperator(BinaryOperatorKind OK);
265 const BinaryOperatorKind OK = BO->getOpcode(); in checkPostStmt()
773 bool isSimpleComparisonOperator(BinaryOperatorKind OK) { in isSimpleComparisonOperator()
H A DPointerArithChecker.cpp319 BinaryOperatorKind OpKind = BOp->getOpcode(); in checkPreStmt()
H A DIteratorRangeChecker.cpp165 BinaryOperatorKind OK = BO->getOpcode(); in checkPreStmt()
H A DDeadStoresChecker.cpp110 BinaryOperatorKind Op = BO->getOpcode(); in LookThroughTransitiveAssignmentsAndCommaOperators()
/llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A DCheckerHelpers.h75 BinaryOperatorKind Bin;
81 explicit OperatorKind(BinaryOperatorKind Bin) : Op{Bin}, IsBinary{true} {} in OperatorKind()
85 BinaryOperatorKind GetBinaryOpUnsafe() const { in GetBinaryOpUnsafe()
90 Optional<BinaryOperatorKind> GetBinaryOp() const { in GetBinaryOp()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A DRedundantExpressionCheck.cpp159 static bool areEquivalentRanges(BinaryOperatorKind OpcodeLHS, in areEquivalentRanges()
161 BinaryOperatorKind OpcodeRHS, in areEquivalentRanges()
179 static bool areExclusiveRanges(BinaryOperatorKind OpcodeLHS, in areExclusiveRanges()
181 BinaryOperatorKind OpcodeRHS, in areExclusiveRanges()
223 static bool rangesFullyCoverDomain(BinaryOperatorKind OpcodeLHS, in rangesFullyCoverDomain()
270 static bool rangeSubsumesRange(BinaryOperatorKind OpcodeLHS, in rangeSubsumesRange()
272 BinaryOperatorKind OpcodeRHS, in rangeSubsumesRange()
1015 BinaryOperatorKind LhsOpcode, RhsOpcode; in checkArithmeticExpr()
1092 BinaryOperatorKind LhsOpcode; in checkBitwiseExpr()
1168 BinaryOperatorKind LhsOpcode, RhsOpcode; in checkRelationalExpr()
[all …]
/llvm-project-15.0.7/clang/include/clang/AST/
H A DOperationKinds.h25 enum BinaryOperatorKind { enum
H A DExprCXX.h307 BinaryOperatorKind Opcode;
322 BinaryOperatorKind getOperator() const { return getDecomposedForm().Opcode; } in getOperator()
323 BinaryOperatorKind getOpcode() const { return getOperator(); } in getOpcode()
324 static StringRef getOpcodeStr(BinaryOperatorKind Op) { in getOpcodeStr()
4604 BinaryOperatorKind Opcode;
4608 SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, in CXXFoldExpr()
4645 BinaryOperatorKind getOperator() const { return Opcode; } in getOperator()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DExtractVariable.cpp234 BinaryOperatorKind Kind;
314 BinaryOperatorKind OuterOp = Op.Kind; in getBinaryOperatorRange()
471 if (BinOpExpr->getOpcode() == BinaryOperatorKind::BO_Assign) in computeExtractedExpr()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DASTUtils.cpp57 if (BO->getOpcode() == BinaryOperatorKind::BO_Or) in exprHasBitFlagWithSpelling()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaPseudoObject.cpp211 BinaryOperatorKind opcode,
284 BinaryOperatorKind opcode,
323 BinaryOperatorKind opcode,
425 BinaryOperatorKind opcode, in buildAssignmentOperation()
459 BinaryOperatorKind nonCompound = in buildAssignmentOperation()
886 BinaryOperatorKind opcode, in buildAssignmentOperation()
994 BinaryOperatorKind opcode, in buildAssignmentOperation()
1583 BinaryOperatorKind opcode, in checkPseudoObjectAssignment()
H A DSemaTemplateVariadic.cpp1225 BinaryOperatorKind Opc = ConvertTokenKindToBinaryOpcode(Operator); in ActOnCXXFoldExpr()
1250 BinaryOperatorKind Operator, in BuildCXXFoldExpr()
1260 BinaryOperatorKind Operator) { in BuildEmptyCXXFoldExpr()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DStringIntegerAssignmentCheck.cpp78 bool handleBinaryOp(clang::BinaryOperatorKind Opcode, const Expr *const LHS, in handleBinaryOp()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DCheckerContext.cpp125 static bool evalComparison(SVal LHSVal, BinaryOperatorKind ComparisonOp, in evalComparison()
H A DCheckerHelpers.cpp153 llvm::StringMap<BinaryOperatorKind> BinOps{ in operationKindFromOverloadedOperator()
H A DRangeConstraintManager.cpp86 static size_t getIndexFromOp(BinaryOperatorKind OP) { in getIndexFromOp()
93 static BinaryOperatorKind getOpFromIndex(size_t Index) { in getOpFromIndex()
94 return static_cast<BinaryOperatorKind>(Index + BO_LT); in getOpFromIndex()
97 TriStateKind getCmpOpState(BinaryOperatorKind CurrentOP, in getCmpOpState()
98 BinaryOperatorKind QueriedOP) const { in getCmpOpState()
102 TriStateKind getCmpOpStateForUnknownX2(BinaryOperatorKind CurrentOP) const { in getCmpOpStateForUnknownX2()
1511 const BinaryOperatorKind CurrentOP = SSE->getOpcode(); in getRangeForComparisonSymbol()
1530 BinaryOperatorKind LastQueriedOpToUnknown = CurrentOP; in getRangeForComparisonSymbol()
1537 BinaryOperatorKind QueriedOP = OperatorRelationsTable::getOpFromIndex(i); in getRangeForComparisonSymbol()
1544 const BinaryOperatorKind ROP = in getRangeForComparisonSymbol()
H A DExplodedGraph.cpp362 BinaryOperatorKind Op = cast<BinaryOperator>(S)->getOpcode(); in getNextStmtForDiagnostics()
H A DSValBuilder.cpp496 if (op == BinaryOperatorKind::BO_Cmp) { in evalBinOp()
512 const auto IsCommutative = [](BinaryOperatorKind Op) { in evalBinOp()

123