]> granicus.if.org Git - clang/commitdiff
Fix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 3 Dec 2015 16:03:34 +0000 (16:03 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 3 Dec 2015 16:03:34 +0000 (16:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254614 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/struct-packed-align.c

index 175866fbe978ea680f1a366242bfe0621e124e3b..abdcd8e6b9eb1ac8387b5068c2c289373fc9beb1 100644 (file)
@@ -151,7 +151,7 @@ struct packed_chars {
   char c:4;
 };
 
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__declspec) // _MSC_VER is unavailable in cc1.
 // On Windows clang uses MSVC compatible layout in this case.
 extern int o1[sizeof(struct packed_chars) == 3 ? 1 : -1];
 extern int o2[__alignof(struct packed_chars) == 1 ? 1 : -1];