[PATCH] D20437: [MSVC] Support of __unaligned qualifier for function types
Andrey Bokhanko via cfe-commits
cfe-commits at lists.llvm.org
Fri May 20 01:52:53 PDT 2016
andreybokhanko marked 2 inline comments as done.
================
Comment at: include/clang/Sema/DeclSpec.h:1152-1169
@@ -1153,19 +1151,20 @@
struct ArrayTypeInfo : TypeInfoCommon {
- /// The type qualifiers for the array: const/volatile/restrict/_Atomic.
- unsigned TypeQuals : 4;
+ /// The type qualifiers for the array:
+ /// const/volatile/restrict/__unaligned/_Atomic.
+ unsigned TypeQuals : 5;
/// True if this dimension included the 'static' keyword.
bool hasStatic : 1;
/// True if this dimension was [*]. In this case, NumElts is null.
bool isStar : 1;
/// This is the size of the array, or null if [] or [*] was specified.
/// Since the parser is multi-purpose, and we don't want to impose a root
/// expression class on all clients, NumElts is untyped.
Expr *NumElts;
void destroy() {}
};
----------------
Yes, MSVC does carry __unaligned in arrays. I added a test to MicrosoftExtensions.cpp.
================
Comment at: include/clang/Sema/DeclSpec.h:1414-1418
@@ -1414,7 +1413,7 @@
struct MemberPointerTypeInfo : TypeInfoCommon {
- /// The type qualifiers: const/volatile/restrict/_Atomic.
- unsigned TypeQuals : 4;
+ /// The type qualifiers: const/volatile/restrict/__unaligned/_Atomic.
+ unsigned TypeQuals : 5;
// CXXScopeSpec has a constructor, so it can't be a direct member.
// So we need some pointer-aligned storage and a bit of trickery.
union {
----------------
The same. A test already exists in MicrosoftExtensions.cpp (line 121).
http://reviews.llvm.org/D20437
More information about the cfe-commits
mailing list