[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 12 12:35:08 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 535da10842c7309e9eeaf9828cf6bb034fecaf16 c67d64d7ca5885b03b6e0738d5e237ccbd3ed38a -- clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp clang/test/Analysis/Checkers/WebKit/call-args-safe-functions.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
index e2c19ef43b..c4a78da254 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
@@ -193,8 +193,8 @@ bool isPtrConversion(const FunctionDecl *F) {
const auto FunctionName = safeGetName(F);
if (FunctionName == "getPtr" || FunctionName == "WeakPtr" ||
FunctionName == "dynamicDowncast" || FunctionName == "downcast" ||
- FunctionName == "checkedDowncast" || FunctionName == "uncheckedDowncast" ||
- FunctionName == "bitwise_cast")
+ FunctionName == "checkedDowncast" ||
+ FunctionName == "uncheckedDowncast" || FunctionName == "bitwise_cast")
return true;
return false;
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
index 5d5fce2867..cc4585a0b0 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
@@ -155,8 +155,7 @@ public:
// FIXME: Most/all of these should be implemented via attributes.
name == "equalIgnoringASCIICase" ||
name == "equalIgnoringASCIICaseCommon" ||
- name == "equalIgnoringNullity" ||
- name == "toString")
+ name == "equalIgnoringNullity" || name == "toString")
return true;
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/81527
More information about the cfe-commits
mailing list