[clang] WebKit Checkers should set DeclWithIssue. (PR #109389)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 01:42:42 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 fd21b7911fbdddc80db2d3971ff10ee70a49b7e3 b8f95b5b809cbeb8199de6cd24e18a605189f722 --extensions cpp -- clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLocalVarsChecker.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
index 410e78c541..c63464b23a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
@@ -49,7 +49,7 @@ public:
using Base = RecursiveASTVisitor<LocalVisitor>;
const UncountedCallArgsChecker *Checker;
- Decl *DeclWithIssue { nullptr };
+ Decl *DeclWithIssue{nullptr};
explicit LocalVisitor(const UncountedCallArgsChecker *Checker)
: Checker(Checker) {
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLocalVarsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLocalVarsChecker.cpp
index 30f10d7e9f..fac1a3454e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLocalVarsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLocalVarsChecker.cpp
@@ -121,7 +121,7 @@ public:
// want to visit those, so we make our own RecursiveASTVisitor.
struct LocalVisitor : public RecursiveASTVisitor<LocalVisitor> {
const UncountedLocalVarsChecker *Checker;
- Decl *DeclWithIssue { nullptr };
+ Decl *DeclWithIssue{nullptr};
TrivialFunctionAnalysis TFA;
@@ -138,7 +138,7 @@ public:
bool TraverseDecl(Decl *D) {
llvm::SaveAndRestore SavedDecl(DeclWithIssue);
if (D && isa<FunctionDecl>(D))
- DeclWithIssue = D;
+ DeclWithIssue = D;
return Base::TraverseDecl(D);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/109389
More information about the cfe-commits
mailing list