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
diff --git a/clang/test/Sema/align-x86.c b/clang/test/Sema/align-x86.c
index 6b93a48..f112c63 100644
--- a/clang/test/Sema/align-x86.c
+++ b/clang/test/Sema/align-x86.c
@@ -23,6 +23,10 @@
 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