[clang] [clang][X86] Add __cpuidex function to cpuid.h (PR #97785)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 4 20:44: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 9e211744b82a72e08c137f75b1c671713e2891af 38325cbf03e5013056dfc1b7939ec7c9738f9fe2 -- clang/test/Headers/__cpuidex_conflict.c clang/lib/Headers/cpuid.h clang/test/Headers/cpuid.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h
index cd55410cda..82d995f1b9 100644
--- a/clang/lib/Headers/cpuid.h
+++ b/clang/lib/Headers/cpuid.h
@@ -342,8 +342,7 @@ static __inline int __get_cpuid_count (unsigned int __leaf,
 // In some configurations, __cpuidex is defined as a builtin (primarily
 // -fms-extensions) which will conflict with the __cpuidex definition below.
 #if !(__has_builtin(__cpuidex))
-static __inline void __cpuidex (int __cpu_info[4], int __leaf, int __subleaf)
-{
+static __inline void __cpuidex(int __cpu_info[4], int __leaf, int __subleaf) {
   __cpuid_count(__leaf, __subleaf, __cpu_info[0], __cpu_info[1], __cpu_info[2],
                 __cpu_info[3]);
 }

``````````

</details>


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


More information about the cfe-commits mailing list