Home | History | Annotate | Download | only in ASTMatchers

Lines Matching refs:binaryOperator

727   StatementMatcher OperatorOr = binaryOperator(hasOperatorName("||"));
735 binaryOperator(hasLHS(cxxBoolLiteral(equals(true))),
750 binaryOperator(hasEitherOperand(cxxBoolLiteral(equals(false))));
762 matches("void x() { 3, 4; }", binaryOperator(hasOperatorName(","))));
765 binaryOperator(hasOperatorName("="))));
767 matches("bool b = 1 != 2;", binaryOperator(hasOperatorName("!="))));
769 matches("bool b = 1 == 2;", binaryOperator(hasOperatorName("=="))));
770 EXPECT_TRUE(matches("bool b = 1 < 2;", binaryOperator(hasOperatorName("<"))));
772 matches("bool b = 1 <= 2;", binaryOperator(hasOperatorName("<="))));
774 matches("int i = 1 << 2;", binaryOperator(hasOperatorName("<<"))));
777 binaryOperator(hasOperatorName("<<="))));
778 EXPECT_TRUE(matches("bool b = 1 > 2;", binaryOperator(hasOperatorName(">"))));
780 matches("bool b = 1 >= 2;", binaryOperator(hasOperatorName(">="))));
782 matches("int i = 1 >> 2;", binaryOperator(hasOperatorName(">>"))));
785 binaryOperator(hasOperatorName(">>="))));
787 matches("int i = 42 ^ 23;", binaryOperator(hasOperatorName("^"))));
790 binaryOperator(hasOperatorName("^="))));
792 matches("int i = 42 % 23;", binaryOperator(hasOperatorName("%"))));
795 binaryOperator(hasOperatorName("%="))));
797 matches("bool b = 42 &23;", binaryOperator(hasOperatorName("&"))));
800 binaryOperator(hasOperatorName("&&"))));
803 binaryOperator(hasOperatorName("&="))));
805 matches("bool b = 42 | 23;", binaryOperator(hasOperatorName("|"))));
808 binaryOperator(hasOperatorName("||"))));
811 binaryOperator(hasOperatorName("|="))));
813 matches("int i = 42 *23;", binaryOperator(hasOperatorName("*"))));
816 binaryOperator(hasOperatorName("*="))));
818 matches("int i = 42 / 23;", binaryOperator(hasOperatorName("/"))));
821 binaryOperator(hasOperatorName("/="))));
823 matches("int i = 42 + 23;", binaryOperator(hasOperatorName("+"))));
826 binaryOperator(hasOperatorName("+="))));
828 matches("int i = 42 - 23;", binaryOperator(hasOperatorName("-"))));
831 binaryOperator(hasOperatorName("-="))));
834 binaryOperator(hasOperatorName("->*"))));
837 binaryOperator(hasOperatorName(".*"))));
842 binaryOperator(hasOperatorName("->"))));
846 notMatches("bool b = true;", binaryOperator(hasOperatorName("="))));
855 binaryOperator()));
1969 StatementMatcher RetVal = returnStmt(hasReturnValue(binaryOperator()));