[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 12 11:35:32 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 c4e517f59c086eafe2eb61d23197820f05be799c e2a62512b1693d06dc3421d93de17fc248a6a496 -- clang/lib/CodeGen/Targets/BPF.cpp clang/test/CodeGen/bpf-abiinfo.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/Targets/BPF.cpp b/clang/lib/CodeGen/Targets/BPF.cpp
index 2646789ccb..41c19064be 100644
--- a/clang/lib/CodeGen/Targets/BPF.cpp
+++ b/clang/lib/CodeGen/Targets/BPF.cpp
@@ -28,7 +28,8 @@ public:
 
     if (const auto *BT = Ty->getAs<BuiltinType>()) {
       // For Int/UInt type, return true to allow proper sign/zero extension.
-      if (BT->getKind() == BuiltinType::Int || BT->getKind() == BuiltinType::UInt)
+      if (BT->getKind() == BuiltinType::Int ||
+          BT->getKind() == BuiltinType::UInt)
         return true;
     }
 

``````````

</details>


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


More information about the cfe-commits mailing list