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 origin/main HEAD --extensions cpp,h --
clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
clang/test/Analysis/Checkers/WebKit/call-args.cpp
clang/test/Analysis/Checkers/WebKit/mock-types.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
index f2ee9c742..ef2ae63ff 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
@@ -240,13 +240,13 @@ bool tryToFindPtrOrigin(
bool isASafeCallArg(const Expr *E) {
assert(E);
auto IsCheckedLocalVarOrParam = [](const VarDecl *Decl) {
- if (auto *Type = Decl->getType().getTypePtrOrNull()) {
- if (auto *CXXRD = Type->getAsCXXRecordDecl()) {
- if (isWeakPtr(CXXRD))
- return false;
- }
+ if (auto *Type = Decl->getType().getTypePtrOrNull()) {
+ if (auto *CXXRD = Type->getAsCXXRecordDecl()) {
+ if (isWeakPtr(CXXRD))
+ return false;
}
- return Decl->isLocalVarDeclOrParm();
+ }
+ return Decl->isLocalVarDeclOrParm();
};
if (auto *Ref = dyn_cast<DeclRefExpr>(E)) {
auto *FoundDecl = Ref->getFoundDecl();
``````````
</details>
https://github.com/llvm/llvm-project/pull/184563
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits