[PATCH] D46613: _Atomic of empty struct shouldn't assert
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 8 18:41:47 PDT 2018
rjmccall added inline comments.
================
Comment at: lib/AST/ASTContext.cpp:1965
+ Width = Target->getCharWidth();
+ Align = Target->getCharWidth();
+ } else if (Width <= Target->getMaxAtomicPromoteWidth()) {
----------------
Alignment, unlike size, is definitely never 0. I think you should leave the original alignment in place; it's a weird case, but we honor over-aligned empty types in a bunch of other places.
Repository:
rC Clang
https://reviews.llvm.org/D46613
More information about the cfe-commits
mailing list