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 origin/main HEAD --extensions cpp,h -- 
clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h 
clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeSafety.h 
clang/lib/Analysis/LifetimeSafety/Checker.cpp 
clang/lib/Analysis/LifetimeSafety/Facts.cpp 
clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp 
clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp 
clang/lib/Sema/SemaLifetimeSafety.h clang/test/Sema/LifetimeSafety/safety.cpp 
--diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h 
b/clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
index 289b89ac8..4db1c9471 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
@@ -236,10 +236,10 @@ public:
 };
 
 /// Represents that an origin is captured into the implicit object via
-/// [[clang::lifetime_capture_by(this)]]. The capture flows into the 
whole-object
-/// `this` origin (we do not know which member receives it), so this is emitted
-/// for `this` at function exit to keep it live: a borrow still held there 
spans
-/// to exit and dangles if it outlived the captured local.
+/// [[clang::lifetime_capture_by(this)]]. The capture flows into the
+/// whole-object `this` origin (we do not know which member receives it), so
+/// this is emitted for `this` at function exit to keep it live: a borrow still
+/// held there spans to exit and dangles if it outlived the captured local.
 class CaptureEscapeFact : public OriginEscapesFact {
   SourceLocation Loc;
 
diff --git a/clang/lib/Analysis/LifetimeSafety/Checker.cpp 
b/clang/lib/Analysis/LifetimeSafety/Checker.cpp
index bfb5cf542..00e2bb86e 100644
--- a/clang/lib/Analysis/LifetimeSafety/Checker.cpp
+++ b/clang/lib/Analysis/LifetimeSafety/Checker.cpp
@@ -320,9 +320,11 @@ public:
         else if (const auto *CaptureEscape = dyn_cast<CaptureEscapeFact>(OEF))
           // A borrow is still held by the object (captured via
           // lifetime_capture_by(this)) when the captured local goes out of
-          // scope; reuse the use-after-scope diagnostic at the capturing 
method.
+          // scope; reuse the use-after-scope diagnostic at the capturing
+          // method.
           SemaHelper->reportUseAfterScope(IssueExpr, CaptureEscape->getLoc(),
-                                          MovedExpr, ExpiryLoc, 
/*ExprChain=*/{});
+                                          MovedExpr, ExpiryLoc,
+                                          /*ExprChain=*/{});
         else
           llvm_unreachable("Unhandled OriginEscapesFact type");
       } else

``````````

</details>


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

Reply via email to