[clang] [clang][PAC] Add ptrauth.h helpers for type diversity helpers (PR #163456)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 14 14:33:31 PDT 2025
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 origin/main HEAD --extensions h -- clang/lib/Headers/ptrauth.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/ptrauth.h b/clang/lib/Headers/ptrauth.h
index 1de8324e1..ad28f06f0 100644
--- a/clang/lib/Headers/ptrauth.h
+++ b/clang/lib/Headers/ptrauth.h
@@ -246,10 +246,11 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
A call to this function is an integer constant expression. */
#if __has_feature(ptrauth_function_pointer_type_discrimination)
-#define ptrauth_function_pointer_type_discriminator(__type) \
+#define ptrauth_function_pointer_type_discriminator(__type) \
__builtin_ptrauth_type_discriminator(__type)
#else
-#define ptrauth_function_pointer_type_discriminator(__type) ((ptrauth_extra_data_t)0)
+#define ptrauth_function_pointer_type_discriminator(__type) \
+ ((ptrauth_extra_data_t)0)
#endif
/* Compute a signature for the given pair of pointer-sized values.
@@ -383,7 +384,8 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
})
#define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0)
-#define ptrauth_function_pointer_type_discriminator(__type) ((ptrauth_extra_data_t)0)
+#define ptrauth_function_pointer_type_discriminator(__type) \
+ ((ptrauth_extra_data_t)0)
#define ptrauth_sign_generic_data(__value, __data) \
({ \
``````````
</details>
https://github.com/llvm/llvm-project/pull/163456
More information about the cfe-commits
mailing list