[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 10:20:07 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 602f43686c45017e3140789f8d574d2c344b4d71 946f978b15746b3e1561d4e9001a0cd966315959 --extensions c,cpp -- clang/lib/AST/ByteCode/InterpBuiltin.cpp clang/test/CodeGen/builtins-hexagon.c
``````````

</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 2bffe43212..3d16d495b1 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -1312,7 +1312,8 @@ static bool interp__builtin_ia32_lzcnt(InterpState &S, CodePtr OpPC,
                                        const Function *Func,
                                        const CallExpr *Call) {
   QualType CallType = Call->getType();
-  if (!CallType->isIntegerType() || !Call->getArg(0)->getType()->isIntegerType())
+  if (!CallType->isIntegerType() ||
+      !Call->getArg(0)->getType()->isIntegerType())
     return false;
 
   APSInt Val = peekToAPSInt(S.Stk, *S.Ctx.classify(Call->getArg(0)));

``````````

</details>


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


More information about the cfe-commits mailing list