[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 16 18:58:18 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 8ba915fe1096de290f5e569d6de97a8bcc8652f7 a590abda0570d922eb7032096de6fdd8cbbe4c63 -- clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp b/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
index b91dfa2677..4001268bde 100644
--- a/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
+++ b/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
@@ -228,7 +228,7 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) {
}
if (const SwitchStmt *SS = dyn_cast<SwitchStmt>(S)) {
- for(const Stmt *CB: dyn_cast<CompoundStmt>(SS->getBody())->body()) {
+ for (const Stmt *CB : dyn_cast<CompoundStmt>(SS->getBody())->body()) {
for (const Decl *D : dyn_cast<DeclStmt>(CB)->decls()) {
// Once we reach the declaration of the VD we can return.
if (D->getCanonicalDecl() == VD)
``````````
</details>
https://github.com/llvm/llvm-project/pull/82089
More information about the cfe-commits
mailing list