================
@@ -723,6 +723,17 @@ void FactsGenerator::handleInvalidatingCall(const Expr 
*Call,
         ThisList->getOuterOriginID(), Call));
 }
 
+void FactsGenerator::handleImplicitObjectFieldUses(const Expr *Call,
+                                                   const FunctionDecl *FD) {
+  const auto *MD = dyn_cast<CXXMethodDecl>(FD);
+  if (!MD || !MD->isInstance())
+    return;
+
+  for (const auto *Field : MD->getParent()->fields())
----------------
usx95 wrote:

Yeah. I suspected that I had not considered this. Let's me file a separate 
issue to track this. Feel free to leave a todo for this for now.

Can you add a unittest in LifetimeSafetyTest.cpp to ensure that `x` and `y` are 
live before call to `foo` to ensure this change handles base class correctly. I 
assume this would be simple as you had something very similar in the regression 
in LifetimeSafetyTest.cpp.

https://github.com/llvm/llvm-project/pull/191731
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to