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,c --
clang/test/Analysis/security-syntax-element-type.c
clang/test/Analysis/security-syntax-width-mismatch.c
clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
--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/CheckSecuritySyntaxOnly.cpp
b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
index f70215fb0..0e95cbcb6 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
@@ -102,7 +102,7 @@ public:
// Helpers.
bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD,
- bool IsWide);
+ bool IsWide);
void emitUnboundedStringDiagnostic(const CallExpr *CE, StringRef Name,
StringRef NarrowReplacement, bool IsWide);
@@ -687,7 +687,6 @@ void WalkAST::checkCall_mkstemp(const CallExpr *CE, const
FunctionDecl *FD) {
// the Bounds of a Memory Buffer
//===----------------------------------------------------------------------===//
-
void WalkAST::emitUnboundedStringDiagnostic(const CallExpr *CE, StringRef Name,
StringRef NarrowReplacement,
bool IsWide) {
@@ -722,7 +721,6 @@ void WalkAST::emitUnboundedStringDiagnostic(const CallExpr
*CE, StringRef Name,
CE->getCallee()->getSourceRange());
}
-
void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) {
if (!filter.check_strcpy)
return;
@@ -766,7 +764,6 @@ void WalkAST::checkCall_strcpy(const CallExpr *CE, const
FunctionDecl *FD) {
emitUnboundedStringDiagnostic(CE, Name, "strlcpy", IsWide);
}
-
//===----------------------------------------------------------------------===//
// Check: Any use of 'strcat' is insecure.
//
@@ -793,7 +790,6 @@ void WalkAST::checkCall_strcat(const CallExpr *CE, const
FunctionDecl *FD) {
emitUnboundedStringDiagnostic(CE, Name, "strlcat", IsWide);
}
-
//===----------------------------------------------------------------------===//
// Check: Any use of 'sprintf', 'vsprintf', 'scanf', 'wscanf', 'fscanf',
// 'fwscanf', 'vscanf', 'vwscanf', 'vfscanf', 'vfwscanf', 'sscanf',
@@ -880,9 +876,8 @@ void WalkAST::checkDeprecatedOrUnsafeBufferHandling(const
CallExpr *CE,
// Common check for str* functions with no bounds parameters.
//===----------------------------------------------------------------------===//
-
bool WalkAST::checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD,
- bool IsWide) {
+ bool IsWide) {
const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>();
if (!FPT)
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/234582
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits