Lines Matching full:et

27 bool ignoreReport(SourceLocation SLoc, ReportOptions Opts, ErrorType ET) {  in ignoreReport()  argument
37 return SLoc.isDisabled() || IsPCSuppressed(ET, Opts.pc, SLoc.getFilename()); in ignoreReport()
91 ErrorType ET; in handleTypeMismatchImpl() local
93 ET = (Data->TypeCheckKind == TCK_NonnullAssign) in handleTypeMismatchImpl()
97 ET = ErrorType::MisalignedPointerUse; in handleTypeMismatchImpl()
99 ET = ErrorType::InsufficientObjectSize; in handleTypeMismatchImpl()
103 if (ignoreReport(Loc.getSourceLocation(), Opts, ET)) in handleTypeMismatchImpl()
112 ScopedReport R(Opts, Loc, ET); in handleTypeMismatchImpl()
114 switch (ET) { in handleTypeMismatchImpl()
117 Diag(Loc, DL_Error, ET, "%0 null pointer of type %1") in handleTypeMismatchImpl()
121 Diag(Loc, DL_Error, ET, "%0 misaligned address %1 for type %3, " in handleTypeMismatchImpl()
127 Diag(Loc, DL_Error, ET, "%0 address %1 with insufficient space " in handleTypeMismatchImpl()
136 Diag(Pointer, DL_Note, ET, "pointer points here"); in handleTypeMismatchImpl()
159 ErrorType ET = ErrorType::AlignmentAssumption; in handleAlignmentAssumptionImpl() local
161 if (ignoreReport(Loc.getSourceLocation(), Opts, ET)) in handleAlignmentAssumptionImpl()
164 ScopedReport R(Opts, Loc, ET); in handleAlignmentAssumptionImpl()
174 Diag(Loc, DL_Error, ET, in handleAlignmentAssumptionImpl()
178 Diag(Loc, DL_Error, ET, in handleAlignmentAssumptionImpl()
185 Diag(AssumptionLoc, DL_Note, ET, "alignment assumption was specified here"); in handleAlignmentAssumptionImpl()
187 Diag(RealPointer, DL_Note, ET, in handleAlignmentAssumptionImpl()
214 ErrorType ET = IsSigned ? ErrorType::SignedIntegerOverflow in handleIntegerOverflowImpl() local
217 if (ignoreReport(Loc, Opts, ET)) in handleIntegerOverflowImpl()
225 ScopedReport R(Opts, Loc, ET); in handleIntegerOverflowImpl()
227 Diag(Loc, DL_Error, ET, "%0 integer overflow: " in handleIntegerOverflowImpl()
253 ErrorType ET = IsSigned ? ErrorType::SignedIntegerOverflow in handleNegateOverflowImpl() local
256 if (ignoreReport(Loc, Opts, ET)) in handleNegateOverflowImpl()
262 ScopedReport R(Opts, Loc, ET); in handleNegateOverflowImpl()
265 Diag(Loc, DL_Error, ET, in handleNegateOverflowImpl()
270 Diag(Loc, DL_Error, ET, "negation of %0 cannot be represented in type %1") in handleNegateOverflowImpl()
292 ErrorType ET; in handleDivremOverflowImpl() local
294 ET = ErrorType::SignedIntegerOverflow; in handleDivremOverflowImpl()
296 ET = ErrorType::IntegerDivideByZero; in handleDivremOverflowImpl()
298 ET = ErrorType::FloatDivideByZero; in handleDivremOverflowImpl()
300 if (ignoreReport(Loc, Opts, ET)) in handleDivremOverflowImpl()
303 ScopedReport R(Opts, Loc, ET); in handleDivremOverflowImpl()
305 switch (ET) { in handleDivremOverflowImpl()
307 Diag(Loc, DL_Error, ET, in handleDivremOverflowImpl()
312 Diag(Loc, DL_Error, ET, "division by zero"); in handleDivremOverflowImpl()
337 ErrorType ET; in handleShiftOutOfBoundsImpl() local
340 ET = ErrorType::InvalidShiftExponent; in handleShiftOutOfBoundsImpl()
342 ET = ErrorType::InvalidShiftBase; in handleShiftOutOfBoundsImpl()
344 if (ignoreReport(Loc, Opts, ET)) in handleShiftOutOfBoundsImpl()
347 ScopedReport R(Opts, Loc, ET); in handleShiftOutOfBoundsImpl()
349 if (ET == ErrorType::InvalidShiftExponent) { in handleShiftOutOfBoundsImpl()
351 Diag(Loc, DL_Error, ET, "shift exponent %0 is negative") << RHSVal; in handleShiftOutOfBoundsImpl()
353 Diag(Loc, DL_Error, ET, in handleShiftOutOfBoundsImpl()
358 Diag(Loc, DL_Error, ET, "left shift of negative value %0") << LHSVal; in handleShiftOutOfBoundsImpl()
360 Diag(Loc, DL_Error, ET, in handleShiftOutOfBoundsImpl()
384 ErrorType ET = ErrorType::OutOfBoundsIndex; in handleOutOfBoundsImpl() local
386 if (ignoreReport(Loc, Opts, ET)) in handleOutOfBoundsImpl()
389 ScopedReport R(Opts, Loc, ET); in handleOutOfBoundsImpl()
392 Diag(Loc, DL_Error, ET, "index %0 out of bounds for type %1") in handleOutOfBoundsImpl()
410 ErrorType ET = ErrorType::UnreachableCall; in handleBuiltinUnreachableImpl() local
411 ScopedReport R(Opts, Data->Loc, ET); in handleBuiltinUnreachableImpl()
412 Diag(Data->Loc, DL_Error, ET, in handleBuiltinUnreachableImpl()
423 ErrorType ET = ErrorType::MissingReturn; in handleMissingReturnImpl() local
424 ScopedReport R(Opts, Data->Loc, ET); in handleMissingReturnImpl()
425 Diag(Data->Loc, DL_Error, ET, in handleMissingReturnImpl()
439 ErrorType ET = ErrorType::NonPositiveVLAIndex; in handleVLABoundNotPositive() local
441 if (ignoreReport(Loc, Opts, ET)) in handleVLABoundNotPositive()
444 ScopedReport R(Opts, Loc, ET); in handleVLABoundNotPositive()
446 Diag(Loc, DL_Error, ET, "variable length array bound evaluates to " in handleVLABoundNotPositive()
486 ErrorType ET = ErrorType::FloatCastOverflow; in handleFloatCastOverflow() local
497 if (ignoreReport(SLoc, Opts, ET)) in handleFloatCastOverflow()
504 ScopedReport R(Opts, Loc, ET); in handleFloatCastOverflow()
506 Diag(Loc, DL_Error, ET, in handleFloatCastOverflow()
529 ErrorType ET = in handleLoadInvalidValue() local
532 if (ignoreReport(Loc, Opts, ET)) in handleLoadInvalidValue()
535 ScopedReport R(Opts, Loc, ET); in handleLoadInvalidValue()
537 Diag(Loc, DL_Error, ET, in handleLoadInvalidValue()
562 ErrorType ET = ErrorType::GenericUB; in handleImplicitConversion() local
570 ET = ErrorType::ImplicitUnsignedIntegerTruncation; in handleImplicitConversion()
572 ET = ErrorType::ImplicitSignedIntegerTruncation; in handleImplicitConversion()
577 ET = ErrorType::ImplicitUnsignedIntegerTruncation; in handleImplicitConversion()
580 ET = ErrorType::ImplicitSignedIntegerTruncation; in handleImplicitConversion()
583 ET = ErrorType::ImplicitIntegerSignChange; in handleImplicitConversion()
586 ET = ErrorType::ImplicitSignedIntegerTruncationOrSignChange; in handleImplicitConversion()
590 if (ignoreReport(Loc, Opts, ET)) in handleImplicitConversion()
593 ScopedReport R(Opts, Loc, ET); in handleImplicitConversion()
599 Diag(Loc, DL_Error, ET, in handleImplicitConversion()
606 Diag(Loc, DL_Error, ET, in handleImplicitConversion()
629 ErrorType ET = ErrorType::InvalidBuiltin; in handleInvalidBuiltin() local
631 if (ignoreReport(Loc, Opts, ET)) in handleInvalidBuiltin()
634 ScopedReport R(Opts, Loc, ET); in handleInvalidBuiltin()
636 Diag(Loc, DL_Error, ET, in handleInvalidBuiltin()
654 ErrorType ET = ErrorType::InvalidObjCCast; in handleInvalidObjCCast() local
656 if (ignoreReport(Loc, Opts, ET)) in handleInvalidObjCCast()
659 ScopedReport R(Opts, Loc, ET); in handleInvalidObjCCast()
664 Diag(Loc, DL_Error, ET, in handleInvalidObjCCast()
687 ErrorType ET = IsAttr ? ErrorType::InvalidNullReturn in handleNonNullReturn() local
690 if (ignoreReport(Loc, Opts, ET)) in handleNonNullReturn()
693 ScopedReport R(Opts, Loc, ET); in handleNonNullReturn()
695 Diag(Loc, DL_Error, ET, in handleNonNullReturn()
698 Diag(Data->AttrLoc, DL_Note, ET, "%0 specified here") in handleNonNullReturn()
732 ErrorType ET = IsAttr ? ErrorType::InvalidNullArgument in handleNonNullArg() local
735 if (ignoreReport(Loc, Opts, ET)) in handleNonNullArg()
738 ScopedReport R(Opts, Loc, ET); in handleNonNullArg()
740 Diag(Loc, DL_Error, ET, in handleNonNullArg()
745 Diag(Data->AttrLoc, DL_Note, ET, "%0 specified here") in handleNonNullArg()
776 ErrorType ET; in handlePointerOverflowImpl() local
779 ET = ErrorType::NullptrWithOffset; in handlePointerOverflowImpl()
781 ET = ErrorType::NullptrWithNonZeroOffset; in handlePointerOverflowImpl()
783 ET = ErrorType::NullptrAfterNonZeroOffset; in handlePointerOverflowImpl()
785 ET = ErrorType::PointerOverflow; in handlePointerOverflowImpl()
787 if (ignoreReport(Loc, Opts, ET)) in handlePointerOverflowImpl()
790 ScopedReport R(Opts, Loc, ET); in handlePointerOverflowImpl()
792 if (ET == ErrorType::NullptrWithOffset) { in handlePointerOverflowImpl()
793 Diag(Loc, DL_Error, ET, "applying zero offset to null pointer"); in handlePointerOverflowImpl()
794 } else if (ET == ErrorType::NullptrWithNonZeroOffset) { in handlePointerOverflowImpl()
795 Diag(Loc, DL_Error, ET, "applying non-zero offset %0 to null pointer") in handlePointerOverflowImpl()
797 } else if (ET == ErrorType::NullptrAfterNonZeroOffset) { in handlePointerOverflowImpl()
799 Loc, DL_Error, ET, in handlePointerOverflowImpl()
804 Diag(Loc, DL_Error, ET, in handlePointerOverflowImpl()
808 Diag(Loc, DL_Error, ET, in handlePointerOverflowImpl()
812 Diag(Loc, DL_Error, ET, in handlePointerOverflowImpl()
839 ErrorType ET = ErrorType::CFIBadType; in handleCFIBadIcall() local
841 if (ignoreReport(Loc, Opts, ET)) in handleCFIBadIcall()
844 ScopedReport R(Opts, Loc, ET); in handleCFIBadIcall()
849 Diag(Loc, DL_Error, ET, in handleCFIBadIcall()
857 Diag(FLoc, DL_Note, ET, "%0 defined here") << FName; in handleCFIBadIcall()
870 Diag(Loc, DL_Note, ET, in handleCFIBadIcall()
929 ErrorType ET = ErrorType::FunctionTypeMismatch; in handleFunctionTypeMismatch() local
930 if (ignoreReport(CallLoc, Opts, ET)) in handleFunctionTypeMismatch()
933 ScopedReport R(Opts, CallLoc, ET); in handleFunctionTypeMismatch()
940 Diag(CallLoc, DL_Error, ET, in handleFunctionTypeMismatch()
943 Diag(FLoc, DL_Note, ET, "%0 defined here") << FName; in handleFunctionTypeMismatch()