Lines Matching refs:OpRange
81 SourceRange OpRange; member
140 Self.CheckCastAlign(SrcExpr.get(), DestType, OpRange); in checkCastAlign()
147 if (Self.CheckObjCConversion(OpRange, DestType, src, CCK) == in checkObjCConversion()
183 Op.OpRange.getBegin()); in ~CheckNoDerefRAII()
211 SourceRange OpRange,
217 SourceRange OpRange,
223 SourceRange OpRange,
231 SourceRange OpRange,
239 SourceRange OpRange,
245 SourceRange OpRange,
254 SourceRange OpRange, unsigned &msg,
297 Op.OpRange = SourceRange(OpLoc, Parens.getEnd()); in BuildCXXNamedCast()
388 Op.OpRange = SourceRange(KWLoc, RParenLoc); in BuildBuiltinBitCastExpr()
770 Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_ref_or_ptr) in CheckDynamicCast()
780 if (Self.RequireCompleteType(OpRange.getBegin(), DestPointee, in CheckDynamicCast()
787 Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_class) in CheckDynamicCast()
803 Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_ptr) in CheckDynamicCast()
810 Self.Diag(OpRange.getBegin(), diag::err_bad_cxx_cast_rvalue) in CheckDynamicCast()
811 << CT_Dynamic << OrigSrcType << this->DestType << OpRange; in CheckDynamicCast()
825 if (Self.RequireCompleteType(OpRange.getBegin(), SrcPointee, in CheckDynamicCast()
832 Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_class) in CheckDynamicCast()
846 Self.Diag(OpRange.getBegin(), diag::err_bad_cxx_cast_qualifiers_away) in CheckDynamicCast()
847 << CT_Dynamic << OrigSrcType << this->DestType << OpRange; in CheckDynamicCast()
862 Self.IsDerivedFrom(OpRange.getBegin(), SrcPointee, DestPointee)) { in CheckDynamicCast()
864 OpRange.getBegin(), OpRange, in CheckDynamicCast()
878 Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_polymorphic) in CheckDynamicCast()
887 Self.Diag(OpRange.getBegin(), diag::err_no_dynamic_cast_with_fno_rtti); in CheckDynamicCast()
899 Self.Diag(OpRange.getBegin(), in CheckDynamicCast()
926 Self.Diag(OpRange.getBegin(), msg) << CT_Const in CheckConstCast()
927 << SrcExpr.get()->getType() << DestType << OpRange; in CheckConstCast()
938 Self.Diag(OpRange.getBegin(), msg) in CheckAddrspaceCast()
939 << CT_Addrspace << SrcExpr.get()->getType() << DestType << OpRange; in CheckAddrspaceCast()
949 SourceRange OpRange) { in DiagnoseReinterpretUpDownCast() argument
1029 SourceLocation BeginLoc = OpRange.getBegin(); in DiagnoseReinterpretUpDownCast()
1032 << OpRange; in DiagnoseReinterpretUpDownCast()
1054 /*CStyle*/false, OpRange, msg, Kind); in CheckReinterpretCast()
1060 Self.Diag(OpRange.getBegin(), diag::err_bad_reinterpret_cast_overload) in CheckReinterpretCast()
1062 << DestType << OpRange; in CheckReinterpretCast()
1066 diagnoseBadCast(Self, msg, CT_Reinterpret, OpRange, SrcExpr.get(), in CheckReinterpretCast()
1074 DiagnoseReinterpretUpDownCast(Self, SrcExpr.get(), DestType, OpRange); in CheckReinterpretCast()
1103 OpRange, DestType, diag::err_bad_static_cast_overload); in CheckStaticCast()
1121 = TryStaticCast(Self, SrcExpr, DestType, Sema::CCK_OtherCast, OpRange, msg, in CheckStaticCast()
1128 Self.Diag(OpRange.getBegin(), diag::err_bad_static_cast_overload) in CheckStaticCast()
1129 << oe->getName() << DestType << OpRange in CheckStaticCast()
1133 diagnoseBadCast(Self, msg, CT_Static, OpRange, SrcExpr.get(), DestType, in CheckStaticCast()
1165 SourceRange OpRange, unsigned &msg, in TryStaticCast() argument
1193 OpRange, msg, Kind, BasePath); in TryStaticCast()
1207 tcr = TryStaticImplicitCast(Self, SrcExpr, DestType, CCK, OpRange, msg, in TryStaticCast()
1251 if (Self.RequireCompleteType(OpRange.getBegin(), DestType, in TryStaticCast()
1273 tcr = TryStaticPointerDowncast(Self, SrcType, DestType, CStyle, OpRange, msg, in TryStaticCast()
1282 OpRange, msg, Kind, BasePath); in TryStaticCast()
1321 Self.Diag(OpRange.getBegin(), diag::ext_ms_cast_fn_obj) << OpRange; in TryStaticCast()
1420 bool CStyle, SourceRange OpRange, in TryStaticReferenceDowncast() argument
1451 OpRange, SrcExpr->getType(), DestType, msg, Kind, in TryStaticReferenceDowncast()
1458 bool CStyle, SourceRange OpRange, in TryStaticPointerDowncast() argument
1483 CStyle, OpRange, SrcType, DestType, msg, Kind, in TryStaticPointerDowncast()
1492 bool CStyle, SourceRange OpRange, QualType OrigSrcType, in TryStaticDowncast() argument
1496 if (!Self.isCompleteType(OpRange.getBegin(), SrcType) || in TryStaticDowncast()
1497 !Self.isCompleteType(OpRange.getBegin(), DestType)) in TryStaticDowncast()
1507 if (!Self.IsDerivedFrom(OpRange.getBegin(), DestType, SrcType, Paths)) { in TryStaticDowncast()
1543 Self.IsDerivedFrom(OpRange.getBegin(), DestType, SrcType, Paths); in TryStaticDowncast()
1558 Self.Diag(OpRange.getBegin(), diag::err_ambiguous_base_to_derived_cast) in TryStaticDowncast()
1561 << PathDisplayStr << OpRange; in TryStaticDowncast()
1568 Self.Diag(OpRange.getBegin(), diag::err_static_downcast_via_virtual) in TryStaticDowncast()
1569 << OrigSrcType << OrigDestType << VirtualBase << OpRange; in TryStaticDowncast()
1575 switch (Self.CheckBaseClassAccess(OpRange.getBegin(), in TryStaticDowncast()
1605 SourceRange OpRange, in TryStaticMemberPointerUpcast() argument
1634 (void)Self.isCompleteType(OpRange.getBegin(), SrcType); in TryStaticMemberPointerUpcast()
1635 (void)Self.isCompleteType(OpRange.getBegin(), DestType); in TryStaticMemberPointerUpcast()
1648 if (!Self.IsDerivedFrom(OpRange.getBegin(), SrcClass, DestClass, Paths)) in TryStaticMemberPointerUpcast()
1656 Self.IsDerivedFrom(OpRange.getBegin(), SrcClass, DestClass, Paths); in TryStaticMemberPointerUpcast()
1660 Self.Diag(OpRange.getBegin(), diag::err_ambiguous_memptr_conv) in TryStaticMemberPointerUpcast()
1661 << 1 << SrcClass << DestClass << PathDisplayStr << OpRange; in TryStaticMemberPointerUpcast()
1667 Self.Diag(OpRange.getBegin(), diag::err_memptr_conv_via_virtual) in TryStaticMemberPointerUpcast()
1668 << SrcClass << DestClass << QualType(VBase, 0) << OpRange; in TryStaticMemberPointerUpcast()
1674 switch (Self.CheckBaseClassAccess(OpRange.getBegin(), in TryStaticMemberPointerUpcast()
1723 SourceRange OpRange, unsigned &msg, in TryStaticImplicitCast() argument
1726 if (Self.RequireCompleteType(OpRange.getBegin(), DestType, in TryStaticImplicitCast()
1728 Self.RequireNonAbstractType(OpRange.getBegin(), DestType, in TryStaticImplicitCast()
1738 ? InitializationKind::CreateCStyleCast(OpRange.getBegin(), OpRange, in TryStaticImplicitCast()
1741 ? InitializationKind::CreateFunctionalCast(OpRange, ListInitialization) in TryStaticImplicitCast()
1742 : InitializationKind::CreateCast(OpRange); in TryStaticImplicitCast()
1949 QualType DstType, SourceRange OpRange) { in DiagnoseCallingConvCast() argument
1990 Self.Diag(OpRange.getBegin(), diag::warn_cast_calling_conv) in DiagnoseCallingConvCast()
1991 << SrcCCName << DstCCName << OpRange; in DiagnoseCallingConvCast()
1996 if (Self.Diags.isIgnored(diag::warn_cast_calling_conv, OpRange.getBegin())) in DiagnoseCallingConvCast()
2036 static void checkIntToPointerCast(bool CStyle, const SourceRange &OpRange, in checkIntToPointerCast() argument
2058 Self.Diag(OpRange.getBegin(), Diag) << SrcType << DestType << OpRange; in checkIntToPointerCast()
2091 SourceRange OpRange, in TryReinterpretCast() argument
2121 /*IsDereference=*/false, OpRange); in TryReinterpretCast()
2145 Self.Diag(OpRange.getBegin(), diag::err_bad_reinterpret_cast_reference) in TryReinterpretCast()
2147 << OpRange << SrcExpr.get()->getSourceRange(); in TryReinterpretCast()
2176 (void)Self.isCompleteType(OpRange.getBegin(), SrcType); in TryReinterpretCast()
2177 (void)Self.isCompleteType(OpRange.getBegin(), DestType); in TryReinterpretCast()
2296 Self.Diag(OpRange.getBegin(), Diag) << SrcType << DestType << OpRange; in TryReinterpretCast()
2308 checkIntToPointerCast(CStyle, OpRange, SrcExpr.get(), DestType, Self); in TryReinterpretCast()
2366 DiagnoseCallingConvCast(Self, SrcExpr, DestType, OpRange); in TryReinterpretCast()
2384 Self.Diag(OpRange.getBegin(), in TryReinterpretCast()
2387 << OpRange; in TryReinterpretCast()
2393 Self.Diag(OpRange.getBegin(), in TryReinterpretCast()
2396 << OpRange; in TryReinterpretCast()
2409 Self.Diag(OpRange.getBegin(), in TryReinterpretCast()
2494 Self.Diag(OpRange.getBegin(), DiagID) in checkAddressSpaceCast()
2603 tcr = TryStaticCast(Self, SrcExpr, DestType, CCK, OpRange, msg, Kind, in CheckCXXCStyleCast()
2611 OpRange, msg, Kind); in CheckCXXCStyleCast()
2634 Self.Diag(OpRange.getBegin(), diag::err_bad_cstyle_cast_overload) in CheckCXXCStyleCast()
2635 << OE->getName() << DestType << OpRange in CheckCXXCStyleCast()
2641 OpRange, SrcExpr.get(), DestType, ListInitialization); in CheckCXXCStyleCast()
2748 if (Self.RequireCompleteType(OpRange.getBegin(), DestType, in CheckCStyleCast()
2773 Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_nonscalar) in CheckCStyleCast()
2783 Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_to_union) in CheckCStyleCast()
2788 Self.Diag(OpRange.getBegin(), diag::err_typecheck_cast_to_union_no_type) in CheckCStyleCast()
2804 Self.Diag(OpRange.getBegin(), in CheckCStyleCast()
2813 Self.Diag(OpRange.getBegin(), diag::err_typecheck_cond_expect_scalar) in CheckCStyleCast()
2831 SrcExpr = Self.CheckExtVectorCast(OpRange, DestType, SrcExpr.get(), Kind); in CheckCStyleCast()
2840 } else if (Self.CheckVectorCast(OpRange, DestType, SrcType, Kind)) { in CheckCStyleCast()
2847 if (Self.CheckVectorCast(OpRange, SrcType, DestType, Kind)) in CheckCStyleCast()
2887 checkIntToPointerCast(/* CStyle */ true, OpRange, SrcExpr.get(), DestType, in CheckCStyleCast()
2915 Self.Diag(OpRange.getBegin(), Diag) << SrcType << DestType << OpRange; in CheckCStyleCast()
2961 DiagnoseCallingConvCast(Self, SrcExpr, DestType, OpRange); in CheckCStyleCast()
2974 if (Self.RequireCompleteType(OpRange.getBegin(), DestType, in CheckBuiltinBitCast()
2976 Self.RequireCompleteType(OpRange.getBegin(), SrcType, in CheckBuiltinBitCast()
2989 Self.Diag(OpRange.getBegin(), diag::err_bit_cast_type_size_mismatch) in CheckBuiltinBitCast()
2996 Self.Diag(OpRange.getBegin(), diag::err_bit_cast_non_trivially_copyable) in CheckBuiltinBitCast()
3003 Self.Diag(OpRange.getBegin(), diag::err_bit_cast_non_trivially_copyable) in CheckBuiltinBitCast()
3056 Op.OpRange = SourceRange(LPLoc, CastExpr->getEndLoc()); in BuildCStyleCastExpr()
3084 Op.OpRange = SourceRange(Op.DestRange.getBegin(), CastExpr->getEndLoc()); in BuildCXXFunctionalCastExpr()