[clang] Propagate lifetimebound from formal parameters to those in the canonical declaration and use that for analysis (PR #107627)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 10 08:55:09 PST 2024
================
@@ -499,6 +499,7 @@ static bool isNormalAssignmentOperator(const FunctionDecl *FD) {
}
bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) {
+ FD = FD->getMostRecentDecl();
----------------
ilya-biryukov wrote:
It would be great to explain the need for `getMostRecentDecl()`, either:
- (my preferred option) with a function with descriptive name that calls `getMostRecentDecl`, e.g. `getDeclWithLifetimeBound(...)`
- with a comment at each call site.
https://github.com/llvm/llvm-project/pull/107627
More information about the cfe-commits
mailing list