================
@@ -1199,6 +1207,21 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
break;
}
+ case LK_LifetimeCapture: {
+ if (!MTE)
+ return false;
+ assert(shouldLifetimeExtendThroughPath(Path) ==
+ PathLifetimeKind::NoExtend &&
+ "No lifetime extension in function calls");
+ if (CapEntity->Entity != nullptr)
+ SemaRef.Diag(DiagLoc, diag::warn_dangling_reference_captured)
+ << true << CapEntity->Entity << DiagRange;
+ else
+ SemaRef.Diag(DiagLoc, diag::warn_dangling_reference_captured)
+ << false << "<ignore>" << DiagRange;
----------------
usx95 wrote:
Done.
https://github.com/llvm/llvm-project/pull/115921
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits