[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 16 03:41:17 PDT 2023


=?utf-8?q?DonĂ¡t?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/67572/clang at github.com>


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 b22917e6e2a0aec05474f58e64b7e87d1ea0a054 59bccd98022f61e6a656dca6ac3fc5622f994226 -- clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
index 0b53aa9b2051..6819cd6a6b90 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
@@ -56,7 +56,8 @@ public:
 std::optional<std::pair<const SubRegion *, NonLoc>>
 computeOffset(ProgramStateRef State, SValBuilder &SVB, SVal Location) {
   QualType T = SVB.getArrayIndexType();
-  auto EvalBinOp = [&SVB, State, T](BinaryOperatorKind Op, NonLoc LHS, NonLoc RHS) {
+  auto EvalBinOp = [&SVB, State, T](BinaryOperatorKind Op, NonLoc LHS,
+                                    NonLoc RHS) {
     // We will use this utility to add and multiply values.
     return SVB.evalBinOpNN(State, Op, LHS, RHS, T).getAs<NonLoc>();
   };

``````````

</details>


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


More information about the cfe-commits mailing list