[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 08:39:27 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 50d837e3019136aa42a73c06dd117fe6ca8cf148 91706032a89c11861c073c33aebf0a37fee5bfb2 -- clang/test/Sema/aarch64-streaming-sme-or-nonstreaming-sve-builtins.c clang/include/clang/Sema/SemaARM.h clang/lib/Sema/SemaARM.cpp clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pext.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_qrshr.c clang/test/CodeGen/aarch64_neon_sve_bridge_intrinsics/target.c clang/test/Sema/aarch64-incompat-sm-builtin-calls.c clang/test/Sema/aarch64-sme-intrinsics/acle_sme_target.c clang/test/Sema/aarch64-sve-intrinsics/acle_sve_bfloat.cpp clang/utils/TableGen/SveEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaARM.cpp b/clang/lib/Sema/SemaARM.cpp
index fa3c96bb11..a124fc8eb4 100644
--- a/clang/lib/Sema/SemaARM.cpp
+++ b/clang/lib/Sema/SemaARM.cpp
@@ -627,10 +627,12 @@ static bool checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall,
       return false;
   }
 
-  if (FnType != SemaARM::ArmNonStreaming && BuiltinType == SemaARM::ArmNonStreaming)
+  if (FnType != SemaARM::ArmNonStreaming &&
+      BuiltinType == SemaARM::ArmNonStreaming)
     S.Diag(TheCall->getBeginLoc(), diag::err_attribute_arm_sm_incompat_builtin)
         << TheCall->getSourceRange() << "non-streaming";
-  else if (FnType != SemaARM::ArmStreaming && BuiltinType == SemaARM::ArmStreaming)
+  else if (FnType != SemaARM::ArmStreaming &&
+           BuiltinType == SemaARM::ArmStreaming)
     S.Diag(TheCall->getBeginLoc(), diag::err_attribute_arm_sm_incompat_builtin)
         << TheCall->getSourceRange() << "streaming";
   else

``````````

</details>


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


More information about the cfe-commits mailing list