[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

Anton Korobeynikov via cfe-commits cfe-commits at lists.llvm.org
Fri May 16 14:00:53 PDT 2025


================
@@ -3383,21 +3383,27 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx,
 
   // Don't bother discriminating based on these types.
   case Type::Pipe:
-  case Type::BitInt:
   case Type::ConstantMatrix:
     OS << "?";
     return;
 
+  case Type::BitInt: {
+    const auto *BtTy = T->castAs<BitIntType>();
----------------
asl wrote:

I was thinking about this. However, looks like the standard explicitly specifies that `_BitInt(n)` are distinct types for each `n`. Therefore e.g. `_BitInt(8)` and `uint8_t` are different types.

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


More information about the cfe-commits mailing list