[clang] [RISCV] Check if v extension is enabled by the function features for the builtins not in Zve64*. (PR #112827)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 20:48:48 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 927af63fddb8e34f23b2974f812156767988ec5f a1b6a764dd93ecb33b493c14c396c5c040be0412 --extensions cpp -- clang/lib/Sema/SemaRISCV.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaRISCV.cpp b/clang/lib/Sema/SemaRISCV.cpp
index 3f1c299928..d1ccc27741 100644
--- a/clang/lib/Sema/SemaRISCV.cpp
+++ b/clang/lib/Sema/SemaRISCV.cpp
@@ -627,8 +627,8 @@ bool SemaRISCV::CheckBuiltinFunctionCall(const TargetInfo &TI,
     llvm::StringMap<bool> FunctionFeatureMap;
     Context.getFunctionFeatureMap(FunctionFeatureMap, FD);
 
-    if (Context.getTypeSize(Info.ElementType) == 64 && !TI.hasFeature("v")
-        && !FunctionFeatureMap.lookup("v"))
+    if (Context.getTypeSize(Info.ElementType) == 64 && !TI.hasFeature("v") &&
+        !FunctionFeatureMap.lookup("v"))
       return Diag(TheCall->getBeginLoc(),
                   diag::err_riscv_builtin_requires_extension)
              << /* IsExtension */ true << TheCall->getSourceRange() << "v";

``````````

</details>


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


More information about the cfe-commits mailing list