Home
last modified time | relevance | path

Searched refs:binaryOperator (Results 1 – 25 of 66) sorted by relevance

123

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DContainerContainsCheck.cpp57 binaryOperator(hasLHS(CountCall), hasOperatorName("!="), hasRHS(Literal0)) in registerMatchers()
60 binaryOperator(hasLHS(Literal0), hasOperatorName("!="), hasRHS(CountCall)) in registerMatchers()
63 binaryOperator(hasLHS(CountCall), hasOperatorName(">"), hasRHS(Literal0)) in registerMatchers()
66 binaryOperator(hasLHS(Literal0), hasOperatorName("<"), hasRHS(CountCall)) in registerMatchers()
69 binaryOperator(hasLHS(CountCall), hasOperatorName(">="), hasRHS(Literal1)) in registerMatchers()
72 binaryOperator(hasLHS(Literal1), hasOperatorName("<="), hasRHS(CountCall)) in registerMatchers()
77 binaryOperator(hasLHS(CountCall), hasOperatorName("=="), hasRHS(Literal0)) in registerMatchers()
89 binaryOperator(hasLHS(CountCall), hasOperatorName("<"), hasRHS(Literal1)) in registerMatchers()
92 binaryOperator(hasLHS(Literal1), hasOperatorName(">"), hasRHS(CountCall)) in registerMatchers()
97 binaryOperator(hasLHS(FindCall), hasOperatorName("!="), hasRHS(EndCall)) in registerMatchers()
[all …]
H A DImplicitBoolConversionCheck.cpp277 binaryOperator(hasOperatorName("^"), hasLHS(ImplicitCastFromBool), in registerMatchers()
301 auto BoolComparison = binaryOperator(hasAnyOperatorName("==", "!="), in registerMatchers()
304 auto BoolOpAssignment = binaryOperator(hasAnyOperatorName("|=", "&="), in registerMatchers()
306 auto BitfieldAssignment = binaryOperator( in registerMatchers()
321 binaryOperator(anyOf(BoolComparison, BoolXor, in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSizeofExpressionCheck.cpp89 binaryOperator(hasLHS(IntegerExpr), hasRHS(IntegerExpr)))); in registerMatchers()
142 binaryOperator(hasEitherOperand(ArrayExpr)), in registerMatchers()
166 expr(hasParent(expr(ignoringParenImpCasts(binaryOperator( in registerMatchers()
182 binaryOperator(matchers::isRelationalOperator(), in registerMatchers()
208 binaryOperator( in registerMatchers()
219 Finder->addMatcher(binaryOperator(hasOperatorName("*"), in registerMatchers()
226 binaryOperator(hasOperatorName("*"), in registerMatchers()
244 const auto PtrDiffExpr = binaryOperator( in registerMatchers()
252 binaryOperator( in registerMatchers()
256 ignoringParenImpCasts(binaryOperator( in registerMatchers()
[all …]
H A DMisplacedPointerArithmeticInAllocCheck.cpp31 const auto AdditiveOperator = binaryOperator(hasAnyOperatorName("+", "-")); in registerMatchers()
38 binaryOperator( in registerMatchers()
47 Finder->addMatcher(binaryOperator(AdditiveOperator, in registerMatchers()
55 Finder->addMatcher(binaryOperator(AdditiveOperator, in registerMatchers()
H A DSuspiciousStringCompareCheck.cpp88 const auto ComparisonBinaryOperator = binaryOperator(isComparisonOperator()); in registerMatchers()
115 binaryOperator(hasAnyOperatorName("&&", "||"), in registerMatchers()
141 binaryOperator(unless(anyOf(isComparisonOperator(), hasOperatorName("&&"), in registerMatchers()
156 binaryOperator(isComparisonOperator(), in registerMatchers()
H A DPosixReturnCheck.cpp33 binaryOperator( in registerMatchers()
42 binaryOperator( in registerMatchers()
51 binaryOperator( in registerMatchers()
H A DTooSmallLoopVariableCheck.cpp82 binaryOperator(hasOperatorName("<"), in registerMatchers()
85 binaryOperator(hasOperatorName("<="), in registerMatchers()
88 binaryOperator(hasOperatorName(">"), hasLHS(LoopBoundMatcher), in registerMatchers()
90 binaryOperator(hasOperatorName(">="), hasLHS(LoopBoundMatcher), in registerMatchers()
H A DSuspiciousEnumUsageCheck.cpp125 binaryOperator( in registerMatchers()
133 binaryOperator(hasAnyOperatorName("+", "|"), in registerMatchers()
140 binaryOperator( in registerMatchers()
146 Finder->addMatcher(binaryOperator(hasAnyOperatorName("|=", "+="), in registerMatchers()
H A DIntegerDivisionCheck.cpp22 const auto BinaryOperators = binaryOperator( in registerMatchers()
34 binaryOperator( in registerMatchers()
H A DMisplacedWideningCastCheck.cpp32 expr(anyOf(binaryOperator(hasAnyOperatorName("+", "-", "*", "<<")), in registerMatchers()
48 Finder->addMatcher(binaryOperator(hasOperatorName("="), hasRHS(Cast)), this); in registerMatchers()
50 binaryOperator(isComparisonOperator(), hasEitherOperand(Cast)), this); in registerMatchers()
H A DMisplacedOperatorInStrlenInAllocCheck.cpp30 binaryOperator( in registerMatchers()
37 allOf(unless(binaryOperator( in registerMatchers()
H A DSignedCharMisuseCheck.cpp82 expr(binaryOperator(hasOperatorName("="), hasLHS(hasType(IntegerType)), in registerMatchers()
96 expr(binaryOperator(hasAnyOperatorName("==", "!="), in registerMatchers()
H A DAssignmentInIfConditionCheck.cpp21 binaryOperator(isAssignmentOperator()) in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/android/
H A DComparisonInTempFailureRetryCheck.cpp49 binaryOperator(hasOperatorName("="), in registerMatchers()
51 binaryOperator(isComparisonOperator()).bind("inner")))) in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/hicpp/
H A DSignedBitwiseCheck.cpp51 binaryOperator(hasAnyOperatorName("^", "|", "&", "^=", "|=", "&="), in registerMatchers()
63 binaryOperator(hasAnyOperatorName("<<", ">>", "<<=", ">>="), in registerMatchers()
/llvm-project-15.0.7/clang/unittests/ASTMatchers/
H A DASTMatchersTraversalTest.cpp1632 StatementMatcher HasOperands = binaryOperator( in TEST()
1650 binaryOperator(hasOperatorName("=")))); in TEST()
1675 binaryOperator(hasOperatorName("^=")))); in TEST()
1680 binaryOperator(hasOperatorName("%=")))); in TEST()
1740 binaryOperator())); in TEST()
3196 auto M = binaryOperator(hasOperatorName("!=")); in TEST()
4099 auto M = binaryOperator( in TEST()
4907 binaryOperator(forEach( in TEST()
4913 binaryOperator( in TEST()
5731 binaryOperator(forCallable(blockDecl())))); in TEST()
[all …]
H A DASTMatchersNarrowingTest.cpp588 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
597 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
606 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
614 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
624 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
634 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
646 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
658 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
670 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
680 mapAnyOf(binaryOperator, cxxOperatorCallExpr) in TEST_P()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A DRedundantExpressionCheck.cpp543 expr(anyOf(binaryOperator(hasAnyOperatorName("+", "|", "&"), in matchBinOpIntegerConstantExpr()
546 binaryOperator(hasOperatorName("-"), in matchBinOpIntegerConstantExpr()
576 const auto RelationalExpr = ignoringParenImpCasts(binaryOperator( in matchRelationalIntegerConstantExpr()
865 binaryOperator( in registerMatchers()
883 binaryOperator(hasAnyOperatorName("|", "&", "||", "&&", "^"), in registerMatchers()
945 binaryOperator( in registerMatchers()
947 hasOperands(ignoringParenImpCasts(binaryOperator( in registerMatchers()
969 traverse(TK_AsIs, binaryOperator(isComparisonOperator(), in registerMatchers()
978 binaryOperator(isComparisonOperator(), in registerMatchers()
987 binaryOperator(isComparisonOperator(), hasLHS(BinOpCstLeft), in registerMatchers()
[all …]
H A DStaticAssertCheck.cpp40 binaryOperator( in registerMatchers()
43 anyOf(binaryOperator(hasEitherOperand(IsAlwaysFalseWithCast)), in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/abseil/
H A DStringFindStrContainsCheck.cpp66 binaryOperator(hasOperatorName("=="), in makeRewriteRule()
74 binaryOperator(hasOperatorName("!="), in makeRewriteRule()
H A DStringFindStartswithCheck.cpp52 binaryOperator( in registerMatchers()
71 binaryOperator( in registerMatchers()
H A DTimeSubtractionCheck.cpp114 hasArgument(0, binaryOperator(hasOperatorName("-"), in registerMatchers()
124 binaryOperator(hasOperatorName("-"), hasRHS(TimeInverseMatcher)) in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DNarrowingConversionsCheck.cpp88 binaryOperator(hasOperands(IsConversionFromIgnoredType, in registerMatchers()
156 binaryOperator( in registerMatchers()
162 ? binaryOperator() in registerMatchers()
163 : binaryOperator(unless(isInTemplateInstantiation())), in registerMatchers()
165 ? binaryOperator() in registerMatchers()
166 : binaryOperator(unless(hasRHS(IsIgnoredTypeTwoLevelsDeep))), in registerMatchers()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DNumberObjectConversionChecker.cpp268 binaryOperator(allOf(hasOperatorName("="), in checkASTCodeBody()
287 binaryOperator(allOf(anyOf(hasOperatorName("=="), hasOperatorName("!=")), in checkASTCodeBody()
294 binaryOperator(allOf(anyOf(hasOperatorName(">="), hasOperatorName(">"), in checkASTCodeBody()
H A DGCDAntipatternChecker.cpp100 forEachDescendant(binaryOperator(bindAssignmentToDecl(SemaphoreBinding), in findGCDAntiPatternWithSemaphore()
142 forEachDescendant(binaryOperator(bindAssignmentToDecl(GroupBinding), in findGCDAntiPatternWithGroup()

123