Home | History | Annotate | Download | only in Sema

Lines Matching full:opc

3063   UnaryOperatorKind Opc;
3066 case tok::plusplus: Opc = UO_PostInc; break;
3067 case tok::minusminus: Opc = UO_PostDec; break;
3075 return BuildUnaryOp(S, OpLoc, Opc, Input);
4985 static bool IsArithmeticOp(BinaryOperatorKind Opc) {
4986 return Opc >= BO_Mul && Opc <= BO_Shr;
5031 static bool IsLogicOp(BinaryOperatorKind Opc) {
5032 return (Opc >= BO_LT && Opc <= BO_NE) || (Opc >= BO_LAnd && Opc <= BO_LOr);
6191 ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc,
6207 if (Opc == BO_Add)
6349 SourceLocation Loc, unsigned Opc,
6371 if (Opc != BO_Shl)
6414 SourceLocation Loc, unsigned Opc,
6453 DiagnoseBadShiftValues(*this, LHS, RHS, Loc, Opc, LHSType);
6569 BinaryOperatorKind Opc = (BinaryOperatorKind) OpaqueOpc;
6604 << (Opc == BO_EQ
6605 || Opc == BO_LE
6606 || Opc == BO_GE));
6612 switch(Opc) {
6655 switch (Opc) {
7047 ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc) {
7071 << (Opc == BO_LAnd ? "&&" : "||");
7074 << (Opc == BO_LAnd ? "&" : "|")
7078 Opc == BO_LAnd ? "&" : "|");
7079 if (Opc == BO_LAnd)
7777 BinaryOperatorKind Opc;
7780 case tok::periodstar: Opc = BO_PtrMemD; break;
7781 case tok::arrowstar: Opc = BO_PtrMemI; break;
7782 case tok::star: Opc = BO_Mul; break;
7783 case tok::slash: Opc = BO_Div; break;
7784 case tok::percent: Opc = BO_Rem; break;
7785 case tok::plus: Opc = BO_Add; break;
7786 case tok::minus: Opc = BO_Sub; break;
7787 case tok::lessless: Opc = BO_Shl; break;
7788 case tok::greatergreater: Opc = BO_Shr; break;
7789 case tok::lessequal: Opc = BO_LE; break;
7790 case tok::less: Opc = BO_LT; break;
7791 case tok::greaterequal: Opc = BO_GE; break;
7792 case tok::greater: Opc = BO_GT; break;
7793 case tok::exclaimequal: Opc = BO_NE; break;
7794 case tok::equalequal: Opc = BO_EQ; break;
7795 case tok::amp: Opc = BO_And; break;
7796 case tok::caret: Opc = BO_Xor; break;
7797 case tok::pipe: Opc = BO_Or; break;
7798 case tok::ampamp: Opc = BO_LAnd; break;
7799 case tok::pipepipe: Opc = BO_LOr; break;
7800 case tok::equal: Opc = BO_Assign; break;
7801 case tok::starequal: Opc = BO_MulAssign; break;
7802 case tok::slashequal: Opc = BO_DivAssign; break;
7803 case tok::percentequal: Opc = BO_RemAssign; break;
7804 case tok::plusequal: Opc = BO_AddAssign; break;
7805 case tok::minusequal: Opc = BO_SubAssign; break;
7806 case tok::lesslessequal: Opc = BO_ShlAssign; break;
7807 case tok::greatergreaterequal: Opc = BO_ShrAssign; break;
7808 case tok::ampequal: Opc = BO_AndAssign; break;
7809 case tok::caretequal: Opc = BO_XorAssign; break;
7810 case tok::pipeequal: Opc = BO_OrAssign; break;
7811 case tok::comma: Opc = BO_Comma; break;
7813 return Opc;
7818 UnaryOperatorKind Opc;
7821 case tok::plusplus: Opc = UO_PreInc; break;
7822 case tok::minusminus: Opc = UO_PreDec; break;
7823 case tok::amp: Opc = UO_AddrOf; break;
7824 case tok::star: Opc = UO_Deref; break;
7825 case tok::plus: Opc = UO_Plus; break;
7826 case tok::minus: Opc = UO_Minus; break;
7827 case tok::tilde: Opc = UO_Not; break;
7828 case tok::exclaim: Opc = UO_LNot; break;
7829 case tok::kw___real: Opc = UO_Real; break;
7830 case tok::kw___imag: Opc = UO_Imag; break;
7831 case tok::kw___extension__: Opc = UO_Extension; break;
7833 return Opc;
7871 /// operator @p Opc at location @c TokLoc. This routine only supports
7874 BinaryOperatorKind Opc,
7903 switch (Opc) {
7917 Opc == BO_PtrMemI);
7922 Opc == BO_Div);
7928 ResultTy = CheckAdditionOperands(LHS, RHS, OpLoc, Opc);
7935 ResultTy = CheckShiftOperands(LHS, RHS, OpLoc, Opc);
7941 ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc, true);
7945 ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc, false);
7954 ResultTy = CheckLogicalOperands(LHS, RHS, OpLoc, Opc);
7959 Opc == BO_DivAssign);
7971 CompResultTy = CheckAdditionOperands(LHS, RHS, OpLoc, Opc, &CompLHSTy);
7982 CompResultTy = CheckShiftOperands(LHS, RHS, OpLoc, Opc, true);
8011 return Owned(new (Context) BinaryOperator(LHS.take(), RHS.take(), Opc,
8018 return Owned(new (Context) CompoundAssignOperator(LHS.take(), RHS.take(), Opc,
8027 static void DiagnoseBitwisePrecedence(Sema &Self, BinaryOperatorKind Opc,
8064 << DiagRange << BinOp::getOpcodeStr(Opc) << OpStr;
8069 Self.PDiag(diag::note_precedence_bitwise_first) << BinOp::getOpcodeStr(Opc),
8163 static void DiagnoseBinOpPrecedence(Sema &Self, BinaryOperatorKind Opc,
8167 if (BinaryOperator::isBitwiseOp(Opc))
8168 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
8171 if (Opc == BO_Or && !OpLoc.isMacroID()/* Don't warn in macros. */) {
8178 if (Opc == BO_LOr && !OpLoc.isMacroID()/* Don't warn in macros. */) {
8188 BinaryOperatorKind Opc = ConvertTokenKindToBinaryOpcode(Kind);
8193 DiagnoseBinOpPrecedence(*this, Opc, TokLoc, LHSExpr, RHSExpr);
8195 return BuildBinOp(S, TokLoc, Opc, LHSExpr, RHSExpr);
8200 BinaryOperatorKind Opc,
8208 = BinaryOperator::getOverloadedOperator(Opc);
8215 return S.CreateOverloadedBinOp(OpLoc, Opc, Functions, LHS, RHS);
8219 BinaryOperatorKind Opc,
8231 BinaryOperator::isAssignmentOp(Opc))
8232 return checkPseudoObjectAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
8247 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8259 if (Opc == BO_Assign && pty->getKind() == BuiltinType::Overload) {
8261 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8264 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8266 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8272 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8283 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8289 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
8293 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
8297 UnaryOperatorKind Opc,
8303 switch (Opc) {
8309 Opc == UO_PreInc ||
8310 Opc == UO_PostInc,
8311 Opc == UO_PreInc ||
8312 Opc == UO_PreDec);
8336 Opc == UO_Plus &&
8399 resultType = CheckRealImagOperand(*this, Input, OpLoc, Opc == UO_Real);
8403 if (Opc == UO_Real || Input.get()->getType()->isAnyComplexType()) {
8425 if (Opc != UO_AddrOf && Opc != UO_Deref)
8428 return Owned(new (Context) UnaryOperator(Input.take(), Opc, resultType,
8475 UnaryOperatorKind Opc, Expr *Input) {
8481 UnaryOperator::isIncrementDecrementOp(Opc))
8482 return checkPseudoObjectIncDec(S, OpLoc, Opc, Input);
8485 if (Opc == UO_Extension)
8486 return CreateBuiltinUnaryOp(OpLoc, Opc, Input);
8490 if (Opc == UO_AddrOf &&
8494 return CreateBuiltinUnaryOp(OpLoc, Opc, Input);
8503 UnaryOperator::getOverloadedOperator(Opc) != OO_None &&
8504 !(Opc == UO_AddrOf && isQualifiedMemberAccess(Input))) {
8510 OverloadedOperatorKind OverOp = UnaryOperator::getOverloadedOperator(Opc);
8515 return CreateOverloadedUnaryOp(OpLoc, Opc, Functions, Input);
8518 return CreateBuiltinUnaryOp(OpLoc, Opc, Input);