[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

Boaz Brickner via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 08:36:49 PST 2024


================
@@ -10230,6 +10230,9 @@ def warn_dangling_pointer_assignment : Warning<
    "object backing %select{|the pointer }0%1 "
    "will be destroyed at the end of the full-expression">,
    InGroup<DanglingAssignment>;
+def warn_dangling_reference_captured : Warning<
+   "object whose reference is captured%select{| by '%1'}0 will be destroyed at the end of the full-expression">,
----------------
bricknerb wrote:

Break the line to avoid going over 80 chars.

https://github.com/llvm/llvm-project/pull/115921


More information about the cfe-commits mailing list