diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-10 23:43:44 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-10 23:43:44 +0000 |
| commit | d7e1fe40e15ea5e077628daf6b742bb69eab65a7 (patch) | |
| tree | 074f346edcb027050abb2f4129991cf70df61d45 /clang/test/Sema | |
| parent | f6d7030f0f99de010dbf2737dc4a58b234e0f4b6 (diff) | |
| download | bcm5719-llvm-d7e1fe40e15ea5e077628daf6b742bb69eab65a7.tar.gz bcm5719-llvm-d7e1fe40e15ea5e077628daf6b742bb69eab65a7.zip | |
Teach __alignof__ to look through arrays before performing the
preferred-alignment transformations. Corrects alignof(T[]) to return
alignof(T) in all cases, as required by relevant standards.
llvm-svn: 210609
Diffstat (limited to 'clang/test/Sema')
| -rw-r--r-- | clang/test/Sema/align-x86.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/align-x86.c b/clang/test/Sema/align-x86.c index 6b93a4893d1..f112c6398c6 100644 --- a/clang/test/Sema/align-x86.c +++ b/clang/test/Sema/align-x86.c @@ -23,6 +23,10 @@ struct __attribute__((packed)) {unsigned int a;} g4; short chk1[__alignof__(g4) == 1 ? 1 : -1]; short chk2[__alignof__(g4.a) == 1 ? 1 : -1]; +double g6[3]; +short chk1[__alignof__(g6) == 8 ? 1 : -1]; +short chk2[__alignof__(double[3]) == 8 ? 1 : -1]; + // PR5637 |

