| | |
| --- | --- |
| Bugzilla Link | [48787](https://llvm.org/bz48787) |
| Version | 11.0 |
| OS | Linux |
| CC | @DougGregor,@zygoloid |
## Extended Description
Consider
```cpp
__declspec(align(8)) typedef int Int[3];
struct Y {
Int y[3];
int i;
};
int f(void) {
return sizeof(struct Y);
}
```
msvc returns 40, clang returns 48 for the x86_64-pc-windows-msvc target. Presumably because [1] rounds up the size to the alignment.
[1] https://github.com/llvm/llvm-project/blob/689aaba7acf5778bfe96bfd7bc4f1f3ceed20dc8/clang/lib/AST/ASTContext.cpp#L1926-L1928
Extended Description
Consider
msvc returns 40, clang returns 48 for the x86_64-pc-windows-msvc target. Presumably because [1] rounds up the size to the alignment.
[1] https://github.com/llvm/llvm-project/blob/689aaba7acf5778bfe96bfd7bc4f1f3ceed20dc8/clang/lib/AST/ASTContext.cpp#L1926-L1928