SourceLocation Loc;
/// DeclKind - This indicates which class this is.
- Kind DeclKind : 8;
+ unsigned DeclKind : 8;
/// InvalidDecl - This indicates a semantic error occurred.
- unsigned int InvalidDecl : 1;
+ unsigned InvalidDecl : 1;
/// HasAttrs - This indicates whether the decl has attributes or not.
- unsigned int HasAttrs : 1;
+ unsigned HasAttrs : 1;
/// Implicit - Whether this declaration was implicitly generated by
/// the implementation rather than explicitly written by the user.
- bool Implicit : 1;
+ unsigned Implicit : 1;
/// \brief Whether this declaration was "used", meaning that a definition is
/// required.
- bool Used : 1;
+ unsigned Used : 1;
protected:
/// Access - Used by C++ decls for the access specifier.
unsigned PCHLevel : 2;
/// ChangedAfterLoad - if this declaration has changed since being loaded
- bool ChangedAfterLoad : 1;
+ unsigned ChangedAfterLoad : 1;
/// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
unsigned IdentifierNamespace : 15;
SourceLocation getLocation() const { return Loc; }
void setLocation(SourceLocation L) { Loc = L; }
- Kind getKind() const { return DeclKind; }
+ Kind getKind() const { return static_cast<Kind>(DeclKind); }
const char *getDeclKindName() const;
Decl *getNextDeclInContext() { return NextDeclInContext; }
///
class DeclContext {
/// DeclKind - This indicates which class this is.
- Decl::Kind DeclKind : 8;
+ unsigned DeclKind : 8;
/// \brief Whether this declaration context also has some external
/// storage that contains additional declarations that are lexically
/// part of this context.
- mutable bool ExternalLexicalStorage : 1;
+ mutable unsigned ExternalLexicalStorage : 1;
/// \brief Whether this declaration context also has some external
/// storage that contains additional declarations that are visible
/// in this context.
- mutable bool ExternalVisibleStorage : 1;
+ mutable unsigned ExternalVisibleStorage : 1;
/// \brief Pointer to the data structure used to lookup declarations
/// within this context (or a DependentStoredDeclsMap if this is a
~DeclContext();
Decl::Kind getDeclKind() const {
- return DeclKind;
+ return static_cast<Decl::Kind>(DeclKind);
}
const char *getDeclKindName() const;