[clang] [-Wunsafe-buffer-usage] Fix AST matcher of UUCAddAssignGadget (PR #79392)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 16:27:54 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 bb6a4850553dd4140a5bd63187ec1b14d0b731f9 afda86d399dbb277d2fa3b0134a9724c206919fb -- clang/lib/Analysis/UnsafeBufferUsage.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Analysis/UnsafeBufferUsage.cpp b/clang/lib/Analysis/UnsafeBufferUsage.cpp
index fd7a76d511..9046491c9e 100644
--- a/clang/lib/Analysis/UnsafeBufferUsage.cpp
+++ b/clang/lib/Analysis/UnsafeBufferUsage.cpp
@@ -1081,7 +1081,7 @@ public:
   }
 
   static Matcher matcher() {
-// clang-format off
+    // clang-format off
     return stmt(isInUnspecifiedUntypedContext(expr(ignoringImpCasts(
         binaryOperator(hasOperatorName("+="),
                        hasLHS(
@@ -1090,7 +1090,7 @@ public:
                           toSupportedVariable())),
                        hasRHS(expr().bind(OffsetTag)))
             .bind(UUCAddAssignTag)))));
-// clang-format on
+    // clang-format on
   }
 
   virtual std::optional<FixItList> getFixits(const Strategy &S) const override;

``````````

</details>


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


More information about the cfe-commits mailing list