[clang] [LifetimeSafety] Fix false negative for GSL Owner type with arrow operator (PR #184725)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 03:33:03 PST 2026


================
@@ -152,8 +152,11 @@ bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee,
     return false;
 
   if (isPointerLikeType(Callee->getReturnType())) {
-    if (!Callee->getIdentifier())
-      return false;
+    if (!Callee->getIdentifier()) {
----------------
usx95 wrote:

Can you add a comment to show that optional-> is an example for this. Not sure if there are other owner types which have ->

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


More information about the cfe-commits mailing list