[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 09:08:06 PDT 2024
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/109804 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 622ae7ffa432ca5985cf1655cf499e04b289bbf2 cdc73ab596981f24895374324600e9ec1cff60a8 --extensions c,cpp,h -- clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp clang/lib/StaticAnalyzer/Core/CoreEngine.cpp clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/test/Analysis/loop-unrolling.cpp clang/test/Analysis/out-of-bounds.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 70625c4994..fd0a7dc46f 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -2822,7 +2822,8 @@ void ExprEngine::processBranch(
ProgramStateRef StTrue, StFalse;
StTrue = StFalse = PrevState;
- if (const auto KnownCondValueAssumption = assumeCondition(Condition, PredN)) {
+ if (const auto KnownCondValueAssumption =
+ assumeCondition(Condition, PredN)) {
std::tie(StTrue, StFalse) = *KnownCondValueAssumption;
if (!StTrue)
``````````
</details>
https://github.com/llvm/llvm-project/pull/109804
More information about the cfe-commits
mailing list