]> granicus.if.org Git - clang/commitdiff
Work around MSVC's lack of support for unrestricted unions by making this
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 23 Jul 2016 02:39:52 +0000 (02:39 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 23 Jul 2016 02:39:52 +0000 (02:39 +0000)
struct a bit bigger under MSVC (this shouldn't be a big deal; we typically
allocate no more than two of these at a time, on the stack).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276509 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/DeclSpec.h

index d48a1c2420c7fd38c79b9cb9e962431d82a95a1c..0c6514fc69422645c58fd631b6205a1a4d7d75cd 100644 (file)
@@ -1752,13 +1752,17 @@ private:
   /// \brief The asm label, if specified.
   Expr *AsmLabel;
 
+#ifndef _MSC_VER
   union {
+#endif
     /// InlineParams - This is a local array used for the first function decl
     /// chunk to avoid going to the heap for the common case when we have one
     /// function chunk in the declarator.
     DeclaratorChunk::ParamInfo InlineParams[16];
     DecompositionDeclarator::Binding InlineBindings[16];
+#ifndef _MSC_VER
   };
+#endif
 
   /// \brief If this is the second or subsequent declarator in this declaration,
   /// the location of the comma before this declarator.