[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 00:20:53 PST 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 fcd51dee42792bf264d26ab4978eb0a3a3001728 fcd963645ee7f3f9c794160fca63d0bef292baf1 --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 d1e8cc9f9b..99098ed8ab 100644
--- a/clang/lib/Sema/CheckExprLifetime.cpp
+++ b/clang/lib/Sema/CheckExprLifetime.cpp
@@ -1215,9 +1215,9 @@ static void checkExprLifetimeImpl(Sema &SemaRef,
     bool IsGslPtrValueFromGslTempOwner = true;
     switch (analyzePathForGSLPointer(Path, L)) {
     case Abandon:
-       return false;
+      return false;
     case Skip:
-       return true;
+      return true;
     case NotGSLPointer:
       IsGslPtrValueFromGslTempOwner = false;
       LLVM_FALLTHROUGH;

``````````

</details>


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


More information about the cfe-commits mailing list