/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
D | SizeofExpressionCheck.cpp | 87 binaryOperator(hasLHS(IntegerExpr), hasRHS(IntegerExpr))))); in registerMatchers() 144 binaryOperator(hasEitherOperand(ArrayExpr)), in registerMatchers() 172 binaryOperator(hasOperatorName("/"), in registerMatchers() 188 binaryOperator(matchers::isRelationalOperator(), in registerMatchers() 199 binaryOperator(hasOperatorName(","))))))) in registerMatchers() 218 binaryOperator(hasOperatorName("/"), in registerMatchers() 229 Finder->addMatcher(binaryOperator(hasOperatorName("*"), in registerMatchers() 236 binaryOperator(hasOperatorName("*"), in registerMatchers() 238 ignoringParenImpCasts(binaryOperator( in registerMatchers() 255 const auto PtrDiffExpr = binaryOperator( in registerMatchers() [all …]
|
D | MisplacedPointerArithmeticInAllocCheck.cpp | 31 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()
|
D | PosixReturnCheck.cpp | 33 binaryOperator( in registerMatchers() 42 binaryOperator( in registerMatchers() 51 binaryOperator( in registerMatchers()
|
D | SuspiciousStringCompareCheck.cpp | 88 const auto ComparisonBinaryOperator = binaryOperator(isComparisonOperator()); in registerMatchers() 120 binaryOperator(hasAnyOperatorName("&&", "||"), in registerMatchers() 146 binaryOperator(unless(anyOf(isComparisonOperator(), hasOperatorName("&&"), in registerMatchers() 161 binaryOperator(isComparisonOperator(), in registerMatchers()
|
D | TooSmallLoopVariableCheck.cpp | 83 binaryOperator(hasOperatorName("<"), in registerMatchers() 86 binaryOperator(hasOperatorName("<="), in registerMatchers() 89 binaryOperator(hasOperatorName(">"), hasLHS(LoopBoundMatcher), in registerMatchers() 91 binaryOperator(hasOperatorName(">="), hasLHS(LoopBoundMatcher), in registerMatchers()
|
D | SuspiciousEnumUsageCheck.cpp | 126 binaryOperator(hasOperatorName("|"), hasLHS(enumExpr("", "enumDecl")), in registerMatchers() 134 binaryOperator(hasAnyOperatorName("+", "|"), in registerMatchers() 142 binaryOperator( in registerMatchers() 148 Finder->addMatcher(binaryOperator(hasAnyOperatorName("|=", "+="), in registerMatchers()
|
D | IntegerDivisionCheck.cpp | 22 const auto BinaryOperators = binaryOperator( in registerMatchers() 34 binaryOperator( in registerMatchers()
|
D | MisplacedWideningCastCheck.cpp | 32 expr(anyOf(binaryOperator(hasAnyOperatorName("+", "-", "*", "<<")), in registerMatchers() 49 Finder->addMatcher(binaryOperator(hasOperatorName("="), hasRHS(Cast)), this); in registerMatchers() 51 binaryOperator(isComparisonOperator(), hasEitherOperand(Cast)), this); in registerMatchers()
|
D | MisplacedOperatorInStrlenInAllocCheck.cpp | 30 binaryOperator( in registerMatchers() 37 allOf(unless(binaryOperator( in registerMatchers()
|
D | RedundantBranchConditionCheck.cpp | 47 binaryOperator(hasOperatorName("&&"), in registerMatchers() 54 binaryOperator( in registerMatchers()
|
D | SignedCharMisuseCheck.cpp | 89 expr(binaryOperator(hasOperatorName("="), hasLHS(hasType(IntegerType)), in registerMatchers() 103 expr(binaryOperator(hasAnyOperatorName("==", "!="), in registerMatchers()
|
D | SizeofContainerCheck.cpp | 30 unless(hasAncestor(binaryOperator( in registerMatchers()
|
/external/clang/unittests/ASTMatchers/ |
D | ASTMatchersTraversalTest.cpp | 727 StatementMatcher OperatorOr = binaryOperator(hasOperatorName("||")); in TEST() 735 binaryOperator(hasLHS(cxxBoolLiteral(equals(true))), in TEST() 750 binaryOperator(hasEitherOperand(cxxBoolLiteral(equals(false)))); in TEST() 762 matches("void x() { 3, 4; }", binaryOperator(hasOperatorName(",")))); in TEST() 765 binaryOperator(hasOperatorName("=")))); in TEST() 767 matches("bool b = 1 != 2;", binaryOperator(hasOperatorName("!=")))); in TEST() 769 matches("bool b = 1 == 2;", binaryOperator(hasOperatorName("==")))); in TEST() 770 EXPECT_TRUE(matches("bool b = 1 < 2;", binaryOperator(hasOperatorName("<")))); in TEST() 772 matches("bool b = 1 <= 2;", binaryOperator(hasOperatorName("<=")))); in TEST() 774 matches("int i = 1 << 2;", binaryOperator(hasOperatorName("<<")))); in TEST() [all …]
|
/external/llvm-project/clang/unittests/ASTMatchers/ |
D | ASTMatchersTraversalTest.cpp | 1288 StatementMatcher OperatorOr = binaryOperator(hasOperatorName("||")); in TEST() 1296 binaryOperator(hasAnyOperatorName("+", "-", "*", "/")); in TEST() 1309 binaryOperator(hasLHS(cxxBoolLiteral(equals(true))), in TEST() 1326 binaryOperator(hasEitherOperand(cxxBoolLiteral(equals(false)))); in TEST() 1334 StatementMatcher HasOperands = binaryOperator( in TEST() 1349 matches("void x() { 3, 4; }", binaryOperator(hasOperatorName(",")))); in TEST() 1352 binaryOperator(hasOperatorName("=")))); in TEST() 1354 matches("bool b = 1 != 2;", binaryOperator(hasOperatorName("!=")))); in TEST() 1356 matches("bool b = 1 == 2;", binaryOperator(hasOperatorName("==")))); in TEST() 1357 EXPECT_TRUE(matches("bool b = 1 < 2;", binaryOperator(hasOperatorName("<")))); in TEST() [all …]
|
/external/llvm-project/clang-tools-extra/clang-tidy/android/ |
D | ComparisonInTempFailureRetryCheck.cpp | 49 binaryOperator(hasOperatorName("="), in registerMatchers() 51 binaryOperator(isComparisonOperator()).bind("inner")))) in registerMatchers()
|
/external/llvm-project/clang-tools-extra/clang-tidy/readability/ |
D | ImplicitBoolConversionCheck.cpp | 276 binaryOperator(hasOperatorName("^"), hasLHS(implicitCastFromBool), in registerMatchers() 300 auto boolComparison = binaryOperator(hasAnyOperatorName("==", "!="), in registerMatchers() 303 auto boolOpAssignment = binaryOperator(hasAnyOperatorName("|=", "&="), in registerMatchers() 305 auto bitfieldAssignment = binaryOperator( in registerMatchers() 320 binaryOperator(anyOf(boolComparison, boolXor, in registerMatchers()
|
/external/llvm-project/clang-tools-extra/clang-tidy/cert/ |
D | MutatingCopyCheck.cpp | 34 expr(anyOf(binaryOperator(isAssignmentOperator(), hasLHS(IsPartOfSource)) in registerMatchers() 46 expr(anyOf(binaryOperator(isAssignmentOperator(), hasLHS(IsPartOfSelf)), in registerMatchers()
|
/external/llvm-project/clang-tools-extra/clang-tidy/hicpp/ |
D | SignedBitwiseCheck.cpp | 51 binaryOperator(hasAnyOperatorName("^", "|", "&", "^=", "|=", "&="), in registerMatchers() 63 binaryOperator(hasAnyOperatorName("<<", ">>", "<<=", ">>="), in registerMatchers()
|
/external/llvm-project/clang-tools-extra/clang-tidy/misc/ |
D | RedundantExpressionCheck.cpp | 544 expr(anyOf(binaryOperator(hasAnyOperatorName("+", "|", "&"), in matchBinOpIntegerConstantExpr() 547 binaryOperator(hasOperatorName("-"), in matchBinOpIntegerConstantExpr() 576 const auto RelationalExpr = ignoringParenImpCasts(binaryOperator( in matchRelationalIntegerConstantExpr() 841 binaryOperator( in registerMatchers() 859 binaryOperator(hasAnyOperatorName("|", "&", "||", "&&", "^"), in registerMatchers() 909 hasUnaryOperand(ignoringParenImpCasts(binaryOperator( in registerMatchers() 912 binaryOperator(hasAnyOperatorName("|", "&")), in registerMatchers() 922 binaryOperator( in registerMatchers() 926 binaryOperator(hasOperatorName("<<"), in registerMatchers() 946 binaryOperator(isComparisonOperator(), in registerMatchers() [all …]
|
D | StaticAssertCheck.cpp | 40 binaryOperator( in registerMatchers() 43 anyOf(binaryOperator(hasEitherOperand(IsAlwaysFalseWithCast)), in registerMatchers()
|
/external/llvm-project/clang-tools-extra/clang-tidy/abseil/ |
D | StringFindStrContainsCheck.cpp | 78 {makeRule(binaryOperator(hasOperatorName("=="), in MakeRule() 84 makeRule(binaryOperator(hasOperatorName("!="), in MakeRule()
|
D | TimeSubtractionCheck.cpp | 114 hasArgument(0, binaryOperator(hasOperatorName("-"), in registerMatchers() 124 binaryOperator(hasOperatorName("-"), hasRHS(TimeInverseMatcher)) in registerMatchers()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
D | NumberObjectConversionChecker.cpp | 268 binaryOperator(allOf(hasOperatorName("="), in checkASTCodeBody() 287 binaryOperator(allOf(anyOf(hasOperatorName("=="), hasOperatorName("!=")), in checkASTCodeBody() 294 binaryOperator(allOf(anyOf(hasOperatorName(">="), hasOperatorName(">"), in checkASTCodeBody()
|
D | GCDAntipatternChecker.cpp | 100 forEachDescendant(binaryOperator(bindAssignmentToDecl(SemaphoreBinding), in findGCDAntiPatternWithSemaphore() 142 forEachDescendant(binaryOperator(bindAssignmentToDecl(GroupBinding), in findGCDAntiPatternWithGroup()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Core/ |
D | LoopUnrolling.cpp | 83 return binaryOperator(anyOf(hasOperatorName("<"), hasOperatorName(">"), in simpleCondition() 99 binaryOperator(isAssignmentOperator(), in changeIntBoundNode() 148 binaryOperator(hasLHS(declRefExpr(to(varDecl( in forLoopMatcher()
|