summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/DeclSpec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/DeclSpec.h')
-rw-r--r--include/clang/Sema/DeclSpec.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h
index d296e74b07..0c4d94efbb 100644
--- a/include/clang/Sema/DeclSpec.h
+++ b/include/clang/Sema/DeclSpec.h
@@ -313,7 +313,10 @@ public:
TQ_volatile = 4,
// This has no corresponding Qualifiers::TQ value, because it's not treated
// as a qualifier in our type system.
- TQ_atomic = 8
+ TQ_atomic = 8,
+ // There is no corresponding Qualifiers::TQ value, but it's kept separately
+ // in a dedicated Qualifiers::Mask bit.
+ TQ_unaligned = 16
};
/// ParsedSpecifiers - Flags to query which specifiers were applied. This is
@@ -344,7 +347,7 @@ private:
unsigned TypeSpecPipe : 1;
// type-qualifiers
- unsigned TypeQualifiers : 4; // Bitwise OR of TQ.
+ unsigned TypeQualifiers : 5; // Bitwise OR of TQ.
// function-specifier
unsigned FS_inline_specified : 1;
@@ -386,7 +389,8 @@ private:
/// TSTNameLoc provides source range info for tag types.
SourceLocation TSTNameLoc;
SourceRange TypeofParensRange;
- SourceLocation TQ_constLoc, TQ_restrictLoc, TQ_volatileLoc, TQ_atomicLoc;
+ SourceLocation TQ_constLoc, TQ_restrictLoc, TQ_volatileLoc, TQ_atomicLoc,
+ TQ_unalignedLoc;
SourceLocation FS_inlineLoc, FS_virtualLoc, FS_explicitLoc, FS_noreturnLoc;
SourceLocation FS_forceinlineLoc;
SourceLocation FriendLoc, ModulePrivateLoc, ConstexprLoc, ConceptLoc;
@@ -540,6 +544,7 @@ public:
SourceLocation getRestrictSpecLoc() const { return TQ_restrictLoc; }
SourceLocation getVolatileSpecLoc() const { return TQ_volatileLoc; }
SourceLocation getAtomicSpecLoc() const { return TQ_atomicLoc; }
+ SourceLocation getUnalignedSpecLoc() const { return TQ_unalignedLoc; }
SourceLocation getPipeLoc() const { return TQ_pipeLoc; }
/// \brief Clear out all of the type qualifiers.
@@ -549,6 +554,7 @@ public:
TQ_restrictLoc = SourceLocation();
TQ_volatileLoc = SourceLocation();
TQ_atomicLoc = SourceLocation();
+ TQ_unalignedLoc = SourceLocation();
TQ_pipeLoc = SourceLocation();
}
@@ -1114,8 +1120,8 @@ struct DeclaratorChunk {
};
struct PointerTypeInfo : TypeInfoCommon {
- /// The type qualifiers: const/volatile/restrict/atomic.
- unsigned TypeQuals : 4;
+ /// The type qualifiers: const/volatile/restrict/atomic/unaligned.
+ unsigned TypeQuals : 5;
/// The location of the const-qualifier, if any.
unsigned ConstQualLoc;
@@ -1129,6 +1135,9 @@ struct DeclaratorChunk {
/// The location of the _Atomic-qualifier, if any.
unsigned AtomicQualLoc;
+ /// The location of the __unaligned-qualifier, if any.
+ unsigned UnalignedQualLoc;
+
void destroy() {
}
};
@@ -1469,7 +1478,8 @@ struct DeclaratorChunk {
SourceLocation ConstQualLoc,
SourceLocation VolatileQualLoc,
SourceLocation RestrictQualLoc,
- SourceLocation AtomicQualLoc) {
+ SourceLocation AtomicQualLoc,
+ SourceLocation UnalignedQualLoc) {
DeclaratorChunk I;
I.Kind = Pointer;
I.Loc = Loc;
@@ -1478,6 +1488,7 @@ struct DeclaratorChunk {
I.Ptr.VolatileQualLoc = VolatileQualLoc.getRawEncoding();
I.Ptr.RestrictQualLoc = RestrictQualLoc.getRawEncoding();
I.Ptr.AtomicQualLoc = AtomicQualLoc.getRawEncoding();
+ I.Ptr.UnalignedQualLoc = UnalignedQualLoc.getRawEncoding();
I.Ptr.AttrList = nullptr;
return I;
}