================ @@ -57,8 +57,13 @@ bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD); // container iterators (begin, end), data accessors (c_str, data, get), // element accessors (operator[], operator*, front, back, at), or propagating // operations (operator+, operator-, operator++, operator--). +// +// `ActualObjectType` is the object's actual type at the call site (e.g., the +// type before any `DerivedToBase` cast). It is included in the `gsl::Owner` +// check, so inherited methods on non-annotated bases are still tracked. bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee, - bool RunningUnderLifetimeSafety); + bool RunningUnderLifetimeSafety, + QualType ActualObjectType = QualType()); ---------------- usx95 wrote:
Why do we need a default arg here ? If this is related stmt-local `-Wdangling` analysis, we can use `RunningUnderLifetimeSafety` to restrict the scope of this PR. https://github.com/llvm/llvm-project/pull/197864 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
