[all-commits] [llvm/llvm-project] 4c6cba: [clang][NFC] Specify Type and ExtQuals as having 1...
Vlad Serebrennikov via All-commits
all-commits at lists.llvm.org
Thu Oct 12 10:54:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4c6cba31aaaa767cdb7f83ec4ca0eab9b6eae127
https://github.com/llvm/llvm-project/commit/4c6cba31aaaa767cdb7f83ec4ca0eab9b6eae127
Author: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: 2023-10-12 (Thu, 12 Oct 2023)
Changed paths:
M clang/include/clang/AST/Type.h
Log Message:
-----------
[clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (#68377)
While working on LLDB visualizer for `QualType`, I stumbled upon `Type` and `ExtQuals` defined with `alignas(8)`. Such alignment leaves only 3 lower bits available for pointer tagging, whereas `QualType` requires 4 (3 qualifiers + discriminator between `Type *` and `ExtQuals *`). Turns out `Type` and its derived classes are allocated with `TypeAlignment == 16` passed to `Allocate()`. So I'm removing misleading `alignas(8)` and fixing corresponding static asserts. Since they are already allocated with 16-byte alignment, this is a non-functional change.
More information about the All-commits
mailing list