[clang] Reland "[clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906)" (PR #105838)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 23 07:57:06 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff e3ce979f1b3ac1e7f2d0261d3abffbd12064eae6 c248c80164965e82807a8682d30ce387f7801cc4 --extensions cpp -- clang/lib/Sema/CheckExprLifetime.cpp clang/test/Sema/warn-lifetime-analysis-nocfg.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/CheckExprLifetime.cpp b/clang/lib/Sema/CheckExprLifetime.cpp
index 0459ead46a..c136255953 100644
--- a/clang/lib/Sema/CheckExprLifetime.cpp
+++ b/clang/lib/Sema/CheckExprLifetime.cpp
@@ -452,7 +452,7 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call,
       if (auto *CME = dyn_cast<CXXMethodDecl>(Callee);
           CME && shouldTrackImplicitObjectArg(CME))
         VisitGSLPointerArg(Callee, ObjectArg,
-                        !Callee->getReturnType()->isReferenceType());
+                           !Callee->getReturnType()->isReferenceType());
     }
   }
 
@@ -821,7 +821,8 @@ static void visitLocalsRetainedByInitializer(IndirectLocalPath &Path,
   }
 
   if (isa<CallExpr>(Init) || isa<CXXConstructExpr>(Init))
-    return visitFunctionCallArguments(Path, Init, Visit, EnableLifetimeWarnings);
+    return visitFunctionCallArguments(Path, Init, Visit,
+                                      EnableLifetimeWarnings);
 
   switch (Init->getStmtClass()) {
   case Stmt::UnaryOperatorClass: {

``````````

</details>


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


More information about the cfe-commits mailing list