@@ -75,6 +75,7 @@ class TemplateParameterList;
7575class TypeAliasTemplateDecl ;
7676class UnresolvedSetImpl ;
7777class VarTemplateDecl ;
78+ enum class ImplicitParamKind ;
7879
7980// / The top declaration context.
8081class TranslationUnitDecl : public Decl ,
@@ -969,12 +970,16 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
969970 friend class ASTDeclReader ;
970971 friend class VarDecl ;
971972
973+ LLVM_PREFERRED_TYPE (StorageClass)
972974 unsigned SClass : 3 ;
975+ LLVM_PREFERRED_TYPE (ThreadStorageClassSpecifier)
973976 unsigned TSCSpec : 2 ;
977+ LLVM_PREFERRED_TYPE (InitializationStyle)
974978 unsigned InitStyle : 2 ;
975979
976980 // / Whether this variable is an ARC pseudo-__strong variable; see
977981 // / isARCPseudoStrong() for details.
982+ LLVM_PREFERRED_TYPE (bool )
978983 unsigned ARCPseudoStrong : 1 ;
979984 };
980985 enum { NumVarDeclBits = 8 };
@@ -995,22 +1000,27 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
9951000 friend class ASTDeclReader ;
9961001 friend class ParmVarDecl ;
9971002
1003+ LLVM_PREFERRED_TYPE (VarDeclBitfields)
9981004 unsigned : NumVarDeclBits;
9991005
10001006 // / Whether this parameter inherits a default argument from a
10011007 // / prior declaration.
1008+ LLVM_PREFERRED_TYPE (bool )
10021009 unsigned HasInheritedDefaultArg : 1 ;
10031010
10041011 // / Describes the kind of default argument for this parameter. By default
10051012 // / this is none. If this is normal, then the default argument is stored in
10061013 // / the \c VarDecl initializer expression unless we were unable to parse
10071014 // / (even an invalid) expression for the default argument.
1015+ LLVM_PREFERRED_TYPE (DefaultArgKind)
10081016 unsigned DefaultArgKind : 2 ;
10091017
10101018 // / Whether this parameter undergoes K&R argument promotion.
1019+ LLVM_PREFERRED_TYPE (bool )
10111020 unsigned IsKNRPromoted : 1 ;
10121021
10131022 // / Whether this parameter is an ObjC method parameter or not.
1023+ LLVM_PREFERRED_TYPE (bool )
10141024 unsigned IsObjCMethodParam : 1 ;
10151025
10161026 // / If IsObjCMethodParam, a Decl::ObjCDeclQualifier.
@@ -1029,51 +1039,64 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
10291039 friend class ImplicitParamDecl ;
10301040 friend class VarDecl ;
10311041
1042+ LLVM_PREFERRED_TYPE (VarDeclBitfields)
10321043 unsigned : NumVarDeclBits;
10331044
10341045 // FIXME: We need something similar to CXXRecordDecl::DefinitionData.
10351046 // / Whether this variable is a definition which was demoted due to
10361047 // / module merge.
1048+ LLVM_PREFERRED_TYPE (bool )
10371049 unsigned IsThisDeclarationADemotedDefinition : 1 ;
10381050
10391051 // / Whether this variable is the exception variable in a C++ catch
10401052 // / or an Objective-C @catch statement.
1053+ LLVM_PREFERRED_TYPE (bool )
10411054 unsigned ExceptionVar : 1 ;
10421055
10431056 // / Whether this local variable could be allocated in the return
10441057 // / slot of its function, enabling the named return value optimization
10451058 // / (NRVO).
1059+ LLVM_PREFERRED_TYPE (bool )
10461060 unsigned NRVOVariable : 1 ;
10471061
10481062 // / Whether this variable is the for-range-declaration in a C++0x
10491063 // / for-range statement.
1064+ LLVM_PREFERRED_TYPE (bool )
10501065 unsigned CXXForRangeDecl : 1 ;
10511066
10521067 // / Whether this variable is the for-in loop declaration in Objective-C.
1068+ LLVM_PREFERRED_TYPE (bool )
10531069 unsigned ObjCForDecl : 1 ;
10541070
10551071 // / Whether this variable is (C++1z) inline.
1072+ LLVM_PREFERRED_TYPE (bool )
10561073 unsigned IsInline : 1 ;
10571074
10581075 // / Whether this variable has (C++1z) inline explicitly specified.
1076+ LLVM_PREFERRED_TYPE (bool )
10591077 unsigned IsInlineSpecified : 1 ;
10601078
10611079 // / Whether this variable is (C++0x) constexpr.
1080+ LLVM_PREFERRED_TYPE (bool )
10621081 unsigned IsConstexpr : 1 ;
10631082
10641083 // / Whether this variable is the implicit variable for a lambda
10651084 // / init-capture.
1085+ LLVM_PREFERRED_TYPE (bool )
10661086 unsigned IsInitCapture : 1 ;
10671087
10681088 // / Whether this local extern variable's previous declaration was
10691089 // / declared in the same block scope. This controls whether we should merge
10701090 // / the type of this declaration with its previous declaration.
1091+ LLVM_PREFERRED_TYPE (bool )
10711092 unsigned PreviousDeclInSameBlockScope : 1 ;
10721093
10731094 // / Defines kind of the ImplicitParamDecl: 'this', 'self', 'vtt', '_cmd' or
10741095 // / something else.
1096+ LLVM_PREFERRED_TYPE (ImplicitParamKind)
10751097 unsigned ImplicitParamKind : 3 ;
10761098
1099+ LLVM_PREFERRED_TYPE (bool )
10771100 unsigned EscapingByref : 1 ;
10781101 };
10791102
@@ -3013,8 +3036,11 @@ class FieldDecl : public DeclaratorDecl, public Mergeable<FieldDecl> {
30133036 ISK_CapturedVLAType,
30143037 };
30153038
3039+ LLVM_PREFERRED_TYPE (bool )
30163040 unsigned BitField : 1 ;
3041+ LLVM_PREFERRED_TYPE (bool )
30173042 unsigned Mutable : 1 ;
3043+ LLVM_PREFERRED_TYPE (InitStorageKind)
30183044 unsigned StorageKind : 2 ;
30193045 mutable unsigned CachedFieldIndex : 28 ;
30203046
0 commit comments