[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 6 01:43:05 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 HEAD~1 HEAD --extensions h,c,cpp -- clang/test/CodeGen/ptrauth-queries.c clang/test/Sema/ptrauth-type-query.c clang/test/SemaCXX/ptrauth-type-query.cpp clang/include/clang/AST/ASTContext.h clang/include/clang/Basic/LangOptions.h clang/include/clang/Parse/Parser.h clang/lib/AST/ASTContext.cpp clang/lib/AST/ExprConstant.cpp clang/lib/AST/ItaniumMangle.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/lib/Parse/ParseExpr.cpp clang/lib/Sema/SemaExpr.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index af4c98475..543c22d63 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -5147,7 +5147,8 @@ private:
   ///          '__builtin_ptrauth_type_discriminator' '(' type-id ')'
   ///          '__builtin_ptrauth_has_authentication' '(' type-id ')'
   ///          '__builtin_ptrauth_schema_key' '(' type-id ')'
-  ///          '__builtin_ptrauth_schema_is_address_discriminated' '(' type-id ')'
+  ///          '__builtin_ptrauth_schema_is_address_discriminated' '(' type-id
+  ///          ')'
   ///          '__builtin_ptrauth_schema_extra_discriminator' '(' type-id ')'
   ///          '__builtin_ptrauth_schema_options' '(' type-id ')'
   /// \endverbatim
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index fa43c4a47..a1dbed4e8 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -767,7 +767,6 @@ ExprResult Parser::ParseBuiltinPtrauthTypeTrait() {
       /*isType=*/true, Ty.get().getAsOpaquePtr(), SourceRange(Loc, EndLoc));
 }
 
-
 ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
                                        bool isAddressOfOperand,
                                        bool &NotCastExpr,

``````````

</details>


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


More information about the cfe-commits mailing list