[clang] [clang][bytecode] Check ia32_{pext, pdep} builtins for integer args (PR #113091)

via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 20 09:12:29 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 490b7d12f6bef2c399fca83e6a6dde31be021913 f9e95ab2ffe38ec1ade35681b24b5ed095adb8e2 --extensions cpp -- clang/lib/AST/ByteCode/InterpBuiltin.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 5cf39ab516..0db03714f1 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -1331,8 +1331,7 @@ static bool interp__builtin_ia32_pdep(InterpState &S, CodePtr OpPC,
                                       const InterpFrame *Frame,
                                       const Function *Func,
                                       const CallExpr *Call) {
-  if (!Call->getArg(0)->isIntegerType() ||
-      !Call->getArg(1)->isIntegerType())
+  if (!Call->getArg(0)->isIntegerType() || !Call->getArg(1)->isIntegerType())
     return false;
 
   PrimType ValT = *S.Ctx.classify(Call->getArg(0));
@@ -1356,8 +1355,7 @@ static bool interp__builtin_ia32_pext(InterpState &S, CodePtr OpPC,
                                       const InterpFrame *Frame,
                                       const Function *Func,
                                       const CallExpr *Call) {
-  if (!Call->getArg(0)->isIntegerType() ||
-      !Call->getArg(1)->isIntegerType())
+  if (!Call->getArg(0)->isIntegerType() || !Call->getArg(1)->isIntegerType())
     return false;
 
   PrimType ValT = *S.Ctx.classify(Call->getArg(0));

``````````

</details>


https://github.com/llvm/llvm-project/pull/113091


More information about the cfe-commits mailing list