[all-commits] [llvm/llvm-project] c22474: [LifetimeSafety] Prevent false-negative lifetimebo...
Abhinav Pradeep via All-commits
all-commits at lists.llvm.org
Tue Jun 2 00:08:41 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c22474fc02c1c26c81577d4cc147ed3b7c04a079
https://github.com/llvm/llvm-project/commit/c22474fc02c1c26c81577d4cc147ed3b7c04a079
Author: Abhinav Pradeep <abhinav.pradeep at oracle.com>
Date: 2026-06-02 (Tue, 02 Jun 2026)
Changed paths:
M clang/lib/Analysis/LifetimeSafety/Checker.cpp
M clang/test/Sema/warn-lifetime-safety-lifetimebound.cpp
Log Message:
-----------
[LifetimeSafety] Prevent false-negative lifetimebound verification when origin escapes in an unrelated manner (#200786)
This PR removes a false-negative `[[lifetimebound]]` verification result
that occurs when the annotated attribute escapes via unrelated origin
escape kinds (escape through global, escape through field).
Change summary:
- `Checker.cpp` has function `checkAnnotations` which checks if an
escaping `Origin` was an annotated parameter. Modified the logic there
to only verify `[[lifetimebound]]` in the case that the escape was
through a return statement.
Fixes #200412
---------
Signed-off-by: Abhinav Pradeep <abhinav.pradeep at oracle.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list