================
@@ -1460,7 +1486,18 @@ void checkExprLifetime(Sema &SemaRef, const
AssignedEntity &Entity,
checkExprLifetimeImpl(SemaRef, /*InitEntity=*/nullptr,
/*ExtendingEntity=*/nullptr, LK_Assignment, &Entity,
- Init);
+ /*CapEntity=*/nullptr, Init);
+}
+
+void checkCaptureByLifetime(Sema &SemaRef, const CapturingEntity &Entity,
+ Expr *Init) {
+ if (!SemaRef.getDiagnostics().isIgnored(
+ diag::warn_dangling_reference_captured, SourceLocation()))
----------------
usx95 wrote:
I was inclining towards using only one warning here. But happy to add both as
well.
Analysis is off if both of the warnings are ignored.
https://github.com/llvm/llvm-project/pull/115921
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits