[clang] [LifetimeSafety] Add suggestion and inference for implicit this (PR #176703)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 19 03:09:07 PST 2026
================
@@ -54,6 +54,8 @@ bool isAssignmentOperatorLifetimeBound(const CXXMethodDecl *CMD) {
bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) {
FD = getDeclWithMergedLifetimeBoundAttrs(FD);
+ if (FD->hasAttr<LifetimeBoundAttr>())
----------------
Xazax-hun wrote:
I am not sure if we want to have two different locations where the attribute might be stored. Since the parser would add this attribute to the `TypeSourceInfo`, I think we should always update that to mimic the parser's behavior rather than attaching it to the declaration.
https://github.com/llvm/llvm-project/pull/176703
More information about the cfe-commits
mailing list