r276509 - Work around MSVC's lack of support for unrestricted unions by making this
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 22 19:39:52 PDT 2016
Author: rsmith
Date: Fri Jul 22 21:39:52 2016
New Revision: 276509
URL: http://llvm.org/viewvc/llvm-project?rev=276509&view=rev
Log:
Work around MSVC's lack of support for unrestricted unions by making this
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).
Modified:
cfe/trunk/include/clang/Sema/DeclSpec.h
Modified: cfe/trunk/include/clang/Sema/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=276509&r1=276508&r2=276509&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Fri Jul 22 21:39:52 2016
@@ -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.
More information about the cfe-commits
mailing list