[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 8 07:26:41 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 4da8ac34f76e707ab94380b94f616457cfd2cb83 108516a346728bfd658963f1b9ea5f430c429ac2 --extensions h,cpp -- clang/include/clang/Sema/Sema.h clang/lib/AST/TypePrinter.cpp clang/lib/Sema/CheckExprLifetime.cpp clang/lib/Sema/CheckExprLifetime.h clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaInit.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaType.cpp clang/test/SemaCXX/attr-lifetimebound.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 c0180add9a..864ec33207 100644
--- a/clang/lib/Sema/CheckExprLifetime.cpp
+++ b/clang/lib/Sema/CheckExprLifetime.cpp
@@ -1441,7 +1441,6 @@ void checkExprLifetimeMustTailArg(Sema &SemaRef,
                         /*AEntity*/ nullptr, Init);
 }
 
-
 void checkAssignmentLifetime(Sema &SemaRef, const CapturingEntity &Entity,
                              Expr *RHS) {
   bool EnableDanglingPointerAssignment = !SemaRef.getDiagnostics().isIgnored(

``````````

</details>


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


More information about the cfe-commits mailing list