[clang] [ABITest] Use _Alignof instead of __alignof__ for ABI alignment (PR #179031)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 31 05:49:08 PST 2026


================
@@ -306,7 +306,7 @@ def printSizeOfType(self, prefix, name, t, output=None, indent=2):
 
     def printAlignOfType(self, prefix, name, t, output=None, indent=2):
         print(
-            '%*sprintf("%s: __alignof__(%s) = %%ld\\n", (long)__alignof__(%s));'
+            '%*sprintf("%s: alignof(%s) = %%ld\\n", (long)_Alignof(%s));'
----------------
zwuis wrote:

Why use `alignof`, instead of `_Alignof`?

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


More information about the cfe-commits mailing list