Home
last modified time | relevance | path

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

123

/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DSizeofExpressionCheck.cpp87 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 …]
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()
DPosixReturnCheck.cpp33 binaryOperator( in registerMatchers()
42 binaryOperator( in registerMatchers()
51 binaryOperator( in registerMatchers()
DSuspiciousStringCompareCheck.cpp88 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()
DTooSmallLoopVariableCheck.cpp83 binaryOperator(hasOperatorName("<"), in registerMatchers()
86 binaryOperator(hasOperatorName("<="), in registerMatchers()
89 binaryOperator(hasOperatorName(">"), hasLHS(LoopBoundMatcher), in registerMatchers()
91 binaryOperator(hasOperatorName(">="), hasLHS(LoopBoundMatcher), in registerMatchers()
DSuspiciousEnumUsageCheck.cpp126 binaryOperator(hasOperatorName("|"), hasLHS(enumExpr("", "enumDecl")), in registerMatchers()
134 binaryOperator(hasAnyOperatorName("+", "|"), in registerMatchers()
142 binaryOperator( in registerMatchers()
148 Finder->addMatcher(binaryOperator(hasAnyOperatorName("|=", "+="), in registerMatchers()
DIntegerDivisionCheck.cpp22 const auto BinaryOperators = binaryOperator( in registerMatchers()
34 binaryOperator( in registerMatchers()
DMisplacedWideningCastCheck.cpp32 expr(anyOf(binaryOperator(hasAnyOperatorName("+", "-", "*", "<<")), in registerMatchers()
49 Finder->addMatcher(binaryOperator(hasOperatorName("="), hasRHS(Cast)), this); in registerMatchers()
51 binaryOperator(isComparisonOperator(), hasEitherOperand(Cast)), this); in registerMatchers()
DMisplacedOperatorInStrlenInAllocCheck.cpp30 binaryOperator( in registerMatchers()
37 allOf(unless(binaryOperator( in registerMatchers()
DRedundantBranchConditionCheck.cpp47 binaryOperator(hasOperatorName("&&"), in registerMatchers()
54 binaryOperator( in registerMatchers()
DSignedCharMisuseCheck.cpp89 expr(binaryOperator(hasOperatorName("="), hasLHS(hasType(IntegerType)), in registerMatchers()
103 expr(binaryOperator(hasAnyOperatorName("==", "!="), in registerMatchers()
DSizeofContainerCheck.cpp30 unless(hasAncestor(binaryOperator( in registerMatchers()
/external/clang/unittests/ASTMatchers/
DASTMatchersTraversalTest.cpp727 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/
DASTMatchersTraversalTest.cpp1288 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/
DComparisonInTempFailureRetryCheck.cpp49 binaryOperator(hasOperatorName("="), in registerMatchers()
51 binaryOperator(isComparisonOperator()).bind("inner")))) in registerMatchers()
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DImplicitBoolConversionCheck.cpp276 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/
DMutatingCopyCheck.cpp34 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/
DSignedBitwiseCheck.cpp51 binaryOperator(hasAnyOperatorName("^", "|", "&", "^=", "|=", "&="), in registerMatchers()
63 binaryOperator(hasAnyOperatorName("<<", ">>", "<<=", ">>="), in registerMatchers()
/external/llvm-project/clang-tools-extra/clang-tidy/misc/
DRedundantExpressionCheck.cpp544 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 …]
DStaticAssertCheck.cpp40 binaryOperator( in registerMatchers()
43 anyOf(binaryOperator(hasEitherOperand(IsAlwaysFalseWithCast)), in registerMatchers()
/external/llvm-project/clang-tools-extra/clang-tidy/abseil/
DStringFindStrContainsCheck.cpp78 {makeRule(binaryOperator(hasOperatorName("=="), in MakeRule()
84 makeRule(binaryOperator(hasOperatorName("!="), in MakeRule()
DTimeSubtractionCheck.cpp114 hasArgument(0, binaryOperator(hasOperatorName("-"), in registerMatchers()
124 binaryOperator(hasOperatorName("-"), hasRHS(TimeInverseMatcher)) in registerMatchers()
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DNumberObjectConversionChecker.cpp268 binaryOperator(allOf(hasOperatorName("="), in checkASTCodeBody()
287 binaryOperator(allOf(anyOf(hasOperatorName("=="), hasOperatorName("!=")), in checkASTCodeBody()
294 binaryOperator(allOf(anyOf(hasOperatorName(">="), hasOperatorName(">"), in checkASTCodeBody()
DGCDAntipatternChecker.cpp100 forEachDescendant(binaryOperator(bindAssignmentToDecl(SemaphoreBinding), in findGCDAntiPatternWithSemaphore()
142 forEachDescendant(binaryOperator(bindAssignmentToDecl(GroupBinding), in findGCDAntiPatternWithGroup()
/external/llvm-project/clang/lib/StaticAnalyzer/Core/
DLoopUnrolling.cpp83 return binaryOperator(anyOf(hasOperatorName("<"), hasOperatorName(">"), in simpleCondition()
99 binaryOperator(isAssignmentOperator(), in changeIntBoundNode()
148 binaryOperator(hasLHS(declRefExpr(to(varDecl( in forLoopMatcher()

123