[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)
via cfe-commits
cfe-commits at lists.llvm.org
Sun May 5 05:43:41 PDT 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 72eaa0ed9934bfaa2449091bbc6e45648d1396d6 c1d62262d2545e4999f08f2ba28a12c71789926f -- clang/test/Analysis/Issue89264.c clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
index 36593d84da..2d23d23c6c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
@@ -290,8 +290,7 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S,
// One should never write to label addresses.
if (auto Label = L.getAs<loc::GotoLabel>()) {
llvm::errs() << "WRITING TO LABEL: " << L << "\n";
- llvm::errs() << "Fatal Error: "
- << "Dereference of the address of a label"
+ llvm::errs() << "Fatal Error: " << "Dereference of the address of a label"
<< "\n";
return;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/91119
More information about the cfe-commits
mailing list