17 const auto IntType = hasType(isInteger());
19 const auto BinaryOperators = binaryOperator(
20 hasAnyOperatorName(
"%",
"<<",
">>",
"<<",
"^",
"|",
"&",
"||",
"&&",
"<",
21 ">",
"<=",
">=",
"==",
"!="));
23 const auto UnaryOperators = unaryOperator(hasAnyOperatorName(
"~",
"!"));
25 const auto Exceptions =
26 anyOf(BinaryOperators, conditionalOperator(), binaryConditionalOperator(),
27 callExpr(IntType), explicitCastExpr(IntType), UnaryOperators);
32 hasOperatorName(
"/"), hasLHS(expr(IntType)),
33 hasRHS(expr(IntType)),
34 hasAncestor(castExpr(hasCastKind(CK_IntegralToFloating))
36 unless(hasAncestor(expr(
38 hasAncestor(castExpr(equalsBoundNode(
"FloatCast")))))))