Lines Matching defs:SemaRef
1284 static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef,
1286 bool EnableGSLAssignmentWarnings = !SemaRef.getDiagnostics().isIgnored(
1294 checkExprLifetimeImpl(Sema &SemaRef, const InitializedEntity *InitEntity,
1343 SemaRef.Diag(DiagLoc, diag::warn_dangling_lifetime_pointer)
1364 SemaRef.Diag(DiagLoc, diag::warn_dangling_variable)
1379 SemaRef.Diag(DiagLoc, diag::warn_dangling_reference_captured)
1382 SemaRef.Diag(DiagLoc, diag::warn_dangling_reference_captured_by_unknown)
1391 SemaRef.Diag(DiagLoc, diag::warn_dangling_lifetime_pointer_assignment)
1394 SemaRef.Diag(DiagLoc, diag::warn_dangling_pointer_assignment)
1407 SemaRef.Diag(DiagLoc, diag::warn_dangling_lifetime_pointer_member)
1409 SemaRef.Diag(ExtendingDecl->getLocation(),
1415 SemaRef.Diag(DiagLoc, shouldLifetimeExtendThroughPath(Path) !=
1425 SemaRef.Diag(ExtendingDecl->getLocation(),
1462 SemaRef.Diag(DiagLoc,
1466 SemaRef.Diag(Member->getLocation(),
1477 SemaRef.Diag(DiagLoc, diag::warn_dangling_lifetime_pointer)
1480 SemaRef.Diag(DiagLoc, RK == RK_ReferenceBinding
1498 SemaRef.Diag(DiagLoc, diag::warn_ret_stack_addr_ref)
1503 SemaRef.Diag(DiagLoc, diag::err_ret_local_block) << DiagRange;
1509 SemaRef.Diag(DiagLoc, diag::warn_ret_addr_label) << DiagRange;
1511 SemaRef.Diag(DiagLoc, diag::warn_ret_stack_addr_ref)
1520 if (SemaRef.getLangOpts().CPlusPlus26 &&
1522 SemaRef.Diag(DiagLoc, diag::err_ret_local_temp_ref)
1525 SemaRef.Diag(DiagLoc, diag::warn_musttail_local_temp_addr_ref)
1528 SemaRef.Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref)
1556 SemaRef.Diag(FD->getLocation(),
1564 SemaRef.Diag(VD->getLocation(), diag::note_local_var_initializer)
1576 SemaRef.Diag(Elem.Capture->getLocation(),
1587 SemaRef.Diag(Param->getDefaultArgRange().getBegin(),
1603 if (shouldRunGSLAssignmentAnalysis(SemaRef, *AEntity))
1630 void checkInitLifetime(Sema &SemaRef, const InitializedEntity &Entity,
1635 checkExprLifetimeImpl(SemaRef, &Entity, ExtendingEntity, LK,
1639 void checkExprLifetimeMustTailArg(Sema &SemaRef,
1641 checkExprLifetimeImpl(SemaRef, &Entity, nullptr, LK_MustTail,
1645 void checkAssignmentLifetime(Sema &SemaRef, const AssignedEntity &Entity,
1647 bool EnableDanglingPointerAssignment = !SemaRef.getDiagnostics().isIgnored(
1651 shouldRunGSLAssignmentAnalysis(SemaRef, Entity);
1656 checkExprLifetimeImpl(SemaRef, /*InitEntity=*/nullptr,
1661 void checkCaptureByLifetime(Sema &SemaRef, const CapturingEntity &Entity,
1663 if (SemaRef.getDiagnostics().isIgnored(diag::warn_dangling_reference_captured,
1665 SemaRef.getDiagnostics().isIgnored(
1668 return checkExprLifetimeImpl(SemaRef, /*InitEntity=*/nullptr,