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 HEAD~1 HEAD --extensions cpp -- 
clang/lib/Analysis/UnsafeBufferUsage.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Analysis/UnsafeBufferUsage.cpp 
b/clang/lib/Analysis/UnsafeBufferUsage.cpp
index e874a483a..ecd67c19e 100644
--- a/clang/lib/Analysis/UnsafeBufferUsage.cpp
+++ b/clang/lib/Analysis/UnsafeBufferUsage.cpp
@@ -968,7 +968,8 @@ static bool hasUnsafePrintfStringArg(const CallExpr &Node, 
ASTContext &Ctx,
   if (!FirstParmTy->isPointerType())
     return false; // possibly some user-defined printf function
 
-  QualType FirstPteTy = 
FirstParmTy->castAs<clang::PointerType>()->getPointeeType();
+  QualType FirstPteTy =
+      FirstParmTy->castAs<clang::PointerType>()->getPointeeType();
 
   if (!Ctx.getFILEType()
            .isNull() && //`FILE *` must be in the context if it is fprintf
@@ -1052,7 +1053,8 @@ static bool hasUnsafeSnprintfBuffer(const CallExpr &Node,
   if (!FirstParmTy->isPointerType())
     return false; // Not an snprint
 
-  QualType FirstPteTy = 
FirstParmTy->castAs<clang::PointerType>()->getPointeeType();
+  QualType FirstPteTy =
+      FirstParmTy->castAs<clang::PointerType>()->getPointeeType();
   const Expr *Buf = Node.getArg(0), *Size = Node.getArg(1);
 
   if (FirstPteTy.isConstQualified() || !Buf->getType()->isPointerType() ||

``````````

</details>


https://github.com/llvm/llvm-project/pull/142966
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to