Lines Matching refs:BO

398           const auto *BO = dyn_cast<BinaryOperator>(S);  in VisitIfStmt()  local
399 if (!BO || BO->getOpcode() != BO_Assign) in VisitIfStmt()
402 getAsBoolLiteral(BO->getRHS()->IgnoreImplicit(), false); in VisitIfStmt()
405 Expr *IgnImp = BO->getLHS()->IgnoreImplicit(); in VisitIfStmt()
408 Loc = BO->getRHS()->getBeginLoc(); in VisitIfStmt()
515 static bool checkEitherSide(const BinaryOperator *BO, Functor Func) { in checkEitherSide() argument
516 return Func(BO->getLHS()) || Func(BO->getRHS()); in checkEitherSide()
520 const auto *BO = dyn_cast<BinaryOperator>(E->IgnoreUnlessSpelledInSource()); in nestedDemorgan() local
521 if (!BO) in nestedDemorgan()
523 if (!BO->getType()->isBooleanType()) in nestedDemorgan()
525 switch (BO->getOpcode()) { in nestedDemorgan()
535 if (checkEitherSide(BO, isUnaryLNot)) in nestedDemorgan()
538 if (checkEitherSide(BO, [NestingLevel](const Expr *E) { in nestedDemorgan()
769 const BinaryOperator *BO) { in flipDemorganOperator() argument
770 assert(BO->isLogicalOp()); in flipDemorganOperator()
771 if (BO->getOperatorLoc().isMacroID()) in flipDemorganOperator()
774 BO->getOperatorLoc(), BO->getOpcode() == BO_LAnd ? "||" : "&&")); in flipDemorganOperator()
778 static BinaryOperatorKind getDemorganFlippedOperator(BinaryOperatorKind BO) { in getDemorganFlippedOperator() argument
779 assert(BinaryOperator::isLogicalOp(BO)); in getDemorganFlippedOperator()
780 return BO == BO_LAnd ? BO_LOr : BO_LAnd; in getDemorganFlippedOperator()
904 const auto *BO = cast<BinaryOperator>(Parent); in shouldRemoveParens() local
905 if (BO->isAssignmentOp()) in shouldRemoveParens()
907 if (BO->isCommaOp()) in shouldRemoveParens()
909 if (BO->getOpcode() == NewOuterBinary) in shouldRemoveParens()