Lines Matching defs:OpLoc

4533                                             SourceLocation OpLoc,
4558 Diag(OpLoc, getLangOpts().C2y
4565 return CheckVecStepTraitOperandType(*this, ExprType, OpLoc, ExprRange);
4568 return CheckVectorElementsTraitOperandType(*this, ExprType, OpLoc,
4572 return checkPtrAuthTypeDiscriminatorOperandType(*this, ExprType, OpLoc,
4576 if (!CheckExtensionTraitOperandType(*this, ExprType, OpLoc, ExprRange,
4581 OpLoc, ExprType, diag::err_sizeof_alignof_incomplete_or_sizeless_type,
4586 Diag(OpLoc, diag::err_sizeof_alignof_function_type) << KWName << ExprRange;
4594 Diag(OpLoc, diag::err_wasm_table_invalid_uett_operand)
4599 if (CheckObjCTraitOperandConstraints(*this, ExprType, OpLoc, ExprRange,
4631 SourceLocation OpLoc,
4640 CheckUnaryExprOrTypeTraitOperand(T, OpLoc, R, ExprKind,
4653 ExprKind, TInfo, Context.getSizeType(), OpLoc, R.getEnd());
4657 Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E, SourceLocation OpLoc,
4696 ExprKind, E, Context.getSizeType(), OpLoc, E->getSourceRange().getEnd());
4700 Sema::ActOnUnaryExprOrTypeTraitExpr(SourceLocation OpLoc,
4709 return CreateUnaryExprOrTypeTraitExpr(TInfo, OpLoc, ExprKind, ArgRange);
4713 ExprResult Result = CreateUnaryExprOrTypeTraitExpr(ArgEx, OpLoc, ExprKind);
4718 SourceLocation OpLoc, SourceRange R) {
4721 return CheckUnaryExprOrTypeTraitOperand(TInfo->getType(), OpLoc, R,
4726 SourceLocation OpLoc, SourceRange R) {
4730 return CheckAlignasTypeArgument(KWName, TInfo, OpLoc, R);
4770 Sema::ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
4784 return BuildUnaryOp(S, OpLoc, Opc, Input);
8710 static void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc,
8728 Self.Diag(OpLoc, DiagID)
8733 Self, OpLoc,
8738 SuggestParentheses(Self, OpLoc,
10872 static void diagnoseStringPlusInt(Sema &Self, SourceLocation OpLoc,
10887 Self.Diag(OpLoc, diag::warn_string_plus_int)
10893 Self.Diag(OpLoc, diag::note_string_plus_scalar_silence)
10895 << FixItHint::CreateReplacement(SourceRange(OpLoc), "[")
10898 Self.Diag(OpLoc, diag::note_string_plus_scalar_silence);
10902 static void diagnoseStringPlusChar(Sema &Self, SourceLocation OpLoc,
10933 Self.Diag(OpLoc, diag::warn_string_plus_char)
10936 Self.Diag(OpLoc, diag::warn_string_plus_char)
10943 Self.Diag(OpLoc, diag::note_string_plus_scalar_silence)
10945 << FixItHint::CreateReplacement(SourceRange(OpLoc), "[")
10948 Self.Diag(OpLoc, diag::note_string_plus_scalar_silence);
13991 SourceLocation OpLoc, bool IsInc,
14005 S.Diag(OpLoc, diag::err_decrement_bool) << Op->getSourceRange();
14009 S.Diag(OpLoc, S.getLangOpts().CPlusPlus17 ? diag::ext_increment_bool
14014 S.Diag(OpLoc, diag::err_increment_decrement_enum) << IsInc << ResType;
14020 if (!checkArithmeticOpPointerOperand(S, OpLoc, Op))
14025 if (checkArithmeticIncompletePointerType(S, OpLoc, Op) ||
14026 checkArithmeticOnObjCPointer(S, OpLoc, Op))
14030 S.Diag(OpLoc, S.getLangOpts().C2y ? diag::warn_c2y_compat_increment_complex
14036 return CheckIncrementDecrementOperand(S, PR.get(), VK, OK, OpLoc,
14048 S.Diag(OpLoc, diag::err_typecheck_illegal_increment_decrement)
14054 if (CheckForModifiableLvalue(Op, OpLoc, S))
14059 S.Diag(OpLoc, diag::warn_deprecated_increment_decrement_volatile)
14155 bool Sema::CheckUseOfCXXMethodAsAddressOfOperand(SourceLocation OpLoc,
14161 return Diag(OpLoc, diag::err_parens_pointer_member_function)
14166 return Diag(OpLoc, diag::err_typecheck_addrof_dtor)
14173 return Diag(OpLoc, diag::err_unqualified_pointer_member_function)
14178 return Diag(OpLoc, diag::err_unqualified_pointer_member_function)
14183 QualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {
14189 Diag(OpLoc, diag::err_typecheck_invalid_lvalue_addrof_addrof_function)
14197 Diag(OpLoc, diag::err_invalid_form_pointer_member_function)
14209 Diag(OpLoc, diag::err_invalid_form_pointer_member_function)
14262 Diag(OpLoc, isSFINAEContext() ? diag::err_typecheck_addrof_temporary
14278 Diag(OpLoc, diag::err_invalid_form_pointer_member_function)
14285 CheckUseOfCXXMethodAsAddressOfOperand(OpLoc, OrigOp.get(), MD);
14314 RetTy, OpLoc, MD->getReturnTypeSourceRange().getBegin());
14316 IsIncomplete |= ReturnOrParamTypeIsIncomplete(PVD->getType(), OpLoc,
14324 (void)isCompleteType(OpLoc, MPTy);
14334 Diag(OpLoc, diag::err_typecheck_invalid_lvalue_addrof)
14340 CheckUseOfCXXMethodAsAddressOfOperand(OpLoc, OrigOp.get(), MD);
14381 Diag(OpLoc,
14395 (void)isCompleteType(OpLoc, MPTy);
14405 diagnoseAddressOfInvalidType(*this, OpLoc, op, AddressOfError);
14413 Diag(OpLoc, diag::ext_typecheck_addrof_void) << op->getSourceRange();
14424 Diag(OpLoc, diag::err_wasm_ca_reference)
14429 Diag(OpLoc, diag::err_wasm_table_pr)
14459 SourceLocation OpLoc,
14485 return CheckIndirectionOperand(S, PR.get(), VK, OpLoc);
14489 S.Diag(OpLoc, diag::err_typecheck_indirection_requires_pointer)
14500 S.Diag(OpLoc, diag::err_typecheck_indirection_through_void_pointer_cpp)
14503 S.Diag(OpLoc, diag::ext_typecheck_indirection_through_void_pointer)
14615 SourceLocation OpLoc, bool IsBuiltin) {
14620 if (OpLoc.isInvalid() || OpLoc.isMacroID())
14642 auto Diag = S.Diag(OpLoc, IsBuiltin ? diag::warn_self_assignment_builtin
14657 SourceLocation OpLoc) {
14692 S.Diag(OpLoc, Diag)
14715 bool IsCompAssign, SourceLocation OpLoc,
14735 ResultTy, VK, OK, OpLoc, FPFeatures,
14740 BinOpResTy, VK, OK, OpLoc, FPFeatures);
14792 ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc,
14834 Diag(OpLoc, diag::err_opencl_atomic_init) << 0 << SR;
14836 ResultTy = InvalidOperands(OpLoc, LHS, RHS);
14846 ResultTy = InvalidOperands(OpLoc, LHS, RHS);
14851 checkTypeSupport(LHSExpr->getType(), OpLoc, /*ValueDecl*/ nullptr);
14852 checkTypeSupport(RHSExpr->getType(), OpLoc, /*ValueDecl*/ nullptr);
14856 ResultTy = CheckAssignmentOperands(LHS.get(), RHS, OpLoc, QualType(), Opc);
14863 DiagnoseSelfAssignment(*this, LHS.get(), RHS.get(), OpLoc, true);
14864 DiagnoseSelfMove(LHS.get(), RHS.get(), OpLoc);
14893 ResultTy = CheckPointerToMemberOperands(LHS, RHS, VK, OpLoc,
14899 ResultTy = CheckMultiplyDivideOperands(LHS, RHS, OpLoc, false,
14903 ResultTy = CheckRemainderOperands(LHS, RHS, OpLoc);
14907 ResultTy = CheckAdditionOperands(LHS, RHS, OpLoc, Opc);
14911 ResultTy = CheckSubtractionOperands(LHS, RHS, OpLoc);
14915 ResultTy = CheckShiftOperands(LHS, RHS, OpLoc, Opc);
14922 ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc);
14926 Diag(OpLoc, diag::warn_consecutive_comparison);
14932 ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc);
14936 ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc);
14940 checkObjCPointerIntrospection(*this, LHS, RHS, OpLoc);
14944 ResultTy = CheckBitwiseOperands(LHS, RHS, OpLoc, Opc);
14949 ResultTy = CheckLogicalOperands(LHS, RHS, OpLoc, Opc);
14954 CompResultTy = CheckMultiplyDivideOperands(LHS, RHS, OpLoc, true,
14959 CheckAssignmentOperands(LHS.get(), RHS, OpLoc, CompResultTy, Opc);
14962 CompResultTy = CheckRemainderOperands(LHS, RHS, OpLoc, true);
14966 CheckAssignmentOperands(LHS.get(), RHS, OpLoc, CompResultTy, Opc);
14970 CompResultTy = CheckAdditionOperands(LHS, RHS, OpLoc, Opc, &CompLHSTy);
14973 CheckAssignmentOperands(LHS.get(), RHS, OpLoc, CompResultTy, Opc);
14977 CompResultTy = CheckSubtractionOperands(LHS, RHS, OpLoc, &CompLHSTy);
14980 CheckAssignmentOperands(LHS.get(), RHS, OpLoc, CompResultTy, Opc);
14984 CompResultTy = CheckShiftOperands(LHS, RHS, OpLoc, Opc, true);
14988 CheckAssignmentOperands(LHS.get(), RHS, OpLoc, CompResultTy, Opc);
14992 DiagnoseSelfAssignment(*this, LHS.get(), RHS.get(), OpLoc, true);
14995 CompResultTy = CheckBitwiseOperands(LHS, RHS, OpLoc, Opc);
14999 CheckAssignmentOperands(LHS.get(), RHS, OpLoc, CompResultTy, Opc);
15002 ResultTy = CheckCommaOperands(*this, LHS, RHS, OpLoc);
15036 << FixItHint::CreateReplacement(SourceRange(OISA->getOpLoc(), OpLoc),
15045 DiagnoseDirectIsaAccess(*this, OIRE, OpLoc, RHS.get());
15051 OpLoc, CurFPFeatureOverrides());
15053 VK, OK, OpLoc, CurFPFeatureOverrides());
15071 OpLoc, CurFPFeatureOverrides());
15074 Context, LHS.get(), RHS.get(), Opc, ResultTy, VK, OK, OpLoc,
15083 SourceLocation OpLoc, Expr *LHSExpr,
15102 ? SourceRange(LHSExpr->getBeginLoc(), OpLoc)
15103 : SourceRange(OpLoc, RHSExpr->getEndLoc());
15110 Self.Diag(OpLoc, diag::warn_precedence_bitwise_rel)
15112 SuggestParentheses(Self, OpLoc,
15115 SuggestParentheses(Self, OpLoc,
15125 EmitDiagnosticForLogicalAndInLogicalOr(Sema &Self, SourceLocation OpLoc,
15129 << Bop->getSourceRange() << OpLoc;
15137 static void DiagnoseLogicalAndInLogicalOrLHS(Sema &S, SourceLocation OpLoc,
15144 return EmitDiagnosticForLogicalAndInLogicalOr(S, OpLoc, Bop);
15151 return EmitDiagnosticForLogicalAndInLogicalOr(S, OpLoc, RBop);
15158 static void DiagnoseLogicalAndInLogicalOrRHS(Sema &S, SourceLocation OpLoc,
15165 return EmitDiagnosticForLogicalAndInLogicalOr(S, OpLoc, Bop);
15174 SourceLocation OpLoc, Expr *SubExpr) {
15179 << Bop->getSourceRange() << OpLoc;
15188 static void DiagnoseAdditionInShift(Sema &S, SourceLocation OpLoc,
15194 << Bop->getSourceRange() << OpLoc << Shift << Op;
15202 static void DiagnoseShiftCompare(Sema &S, SourceLocation OpLoc,
15216 S.Diag(OpLoc, diag::warn_overloaded_shift_in_comparison)
15224 S, OpLoc, S.PDiag(diag::note_evaluate_comparison_first),
15231 SourceLocation OpLoc, Expr *LHSExpr,
15235 DiagnoseBitwisePrecedence(Self, Opc, OpLoc, LHSExpr, RHSExpr);
15239 !OpLoc.isMacroID()/* Don't warn in macros. */) {
15240 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, LHSExpr);
15241 DiagnoseBitwiseOpInBitwiseOp(Self, Opc, OpLoc, RHSExpr);
15246 if (Opc == BO_LOr && !OpLoc.isMacroID()/* Don't warn in macros. */) {
15247 DiagnoseLogicalAndInLogicalOrLHS(Self, OpLoc, LHSExpr, RHSExpr);
15248 DiagnoseLogicalAndInLogicalOrRHS(Self, OpLoc, LHSExpr, RHSExpr);
15254 DiagnoseAdditionInShift(Self, OpLoc, LHSExpr, Shift);
15255 DiagnoseAdditionInShift(Self, OpLoc, RHSExpr, Shift);
15261 DiagnoseShiftCompare(Self, OpLoc, LHSExpr, RHSExpr);
15264 static void DetectPrecisionLossInComplexDivision(Sema &S, SourceLocation OpLoc,
15281 S.LocationOfExcessPrecisionNotSatisfied = OpLoc;
15319 void Sema::LookupBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc,
15333 static ExprResult BuildOverloadedBinOp(Sema &S, Scope *Sc, SourceLocation OpLoc,
15346 DiagnoseSelfAssignment(S, LHS, RHS, OpLoc, false);
15354 CheckIdentityFieldAssignment(LHS, RHS, OpLoc, S);
15362 S.LookupBinOp(Sc, OpLoc, Opc, Functions);
15366 return S.CreateOverloadedBinOp(OpLoc, Opc, Functions, LHS, RHS);
15369 ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc,
15390 return PseudoObject().checkAssignment(S, OpLoc, Opc, LHSExpr, RHSExpr);
15405 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15443 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15445 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
15451 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15464 return BuildOverloadedBinOp(*this, S, OpLoc, Opc, LHSExpr, RHSExpr);
15479 OpLoc, CurFPFeatureOverrides());
15504 VK_PRValue, OK_Ordinary, OpLoc,
15509 return CreateBuiltinBinOp(OpLoc, Opc, LHSExpr, RHSExpr);
15522 ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
15540 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15546 if (getLangOpts().HLSL && OpLoc.isValid()) {
15548 return ExprError(Diag(OpLoc, diag::err_hlsl_operator_unsupported) << 0);
15550 return ExprError(Diag(OpLoc, diag::err_hlsl_operator_unsupported) << 1);
15563 CheckIncrementDecrementOperand(*this, Input.get(), VK, OK, OpLoc,
15569 resultType = CheckAddressOfOperand(Input, OpLoc);
15578 CheckIndirectionOperand(*this, Input.get(), VK, OpLoc, IsAfterAmp);
15612 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15623 Diag(OpLoc, diag::ext_integer_complement_complex)
15632 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15635 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15657 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15673 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15683 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15693 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15700 return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
15710 resultType = CheckRealImagOperand(*this, Input, OpLoc, Opc == UO_Real);
15751 OpLoc, CanOverflow, CurFPFeatureOverrides());
15801 ExprResult Sema::BuildUnaryOp(Scope *S, SourceLocation OpLoc,
15810 return PseudoObject().checkIncDec(S, OpLoc, Opc, Input);
15814 return CreateBuiltinUnaryOp(OpLoc, Opc, Input);
15822 return CreateBuiltinUnaryOp(OpLoc, Opc, Input);
15839 return CreateOverloadedUnaryOp(OpLoc, Opc, Functions, Input);
15842 return CreateBuiltinUnaryOp(OpLoc, Opc, Input, IsAfterAmp);
15845 ExprResult Sema::ActOnUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Op,
15847 return BuildUnaryOp(S, OpLoc, ConvertTokenKindToUnaryOpcode(Op), Input,
15851 ExprResult Sema::ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc,
15856 OpLoc, LabLoc, TheDecl, Context.getPointerType(Context.VoidTy));