Skip to content

Commit

Permalink
[clang][NFC] Annotate Attr.h with preferred_type
Browse files Browse the repository at this point in the history
  • Loading branch information
Endilll committed Nov 6, 2023
1 parent 1881832 commit 24faf3b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clang/include/clang/AST/Attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,23 @@ class OMPTraitInfo;
/// Attr - This represents one attribute.
class Attr : public AttributeCommonInfo {
private:
LLVM_PREFERRED_TYPE(attr::Kind)
unsigned AttrKind : 16;

protected:
/// An index into the spelling list of an
/// attribute defined in Attr.td file.
LLVM_PREFERRED_TYPE(bool)
unsigned Inherited : 1;
LLVM_PREFERRED_TYPE(bool)
unsigned IsPackExpansion : 1;
LLVM_PREFERRED_TYPE(bool)
unsigned Implicit : 1;
// FIXME: These are properties of the attribute kind, not state for this
// instance of the attribute.
LLVM_PREFERRED_TYPE(bool)
unsigned IsLateParsed : 1;
LLVM_PREFERRED_TYPE(bool)
unsigned InheritEvenIfAlreadyPresent : 1;

void *operator new(size_t bytes) noexcept {
Expand Down Expand Up @@ -243,7 +249,9 @@ class ParameterABIAttr : public InheritableParamAttr {
class ParamIdx {
// Idx is exposed only via accessors that specify specific encodings.
unsigned Idx : 30;
LLVM_PREFERRED_TYPE(bool)
unsigned HasThis : 1;
LLVM_PREFERRED_TYPE(bool)
unsigned IsValid : 1;

void assertComparable(const ParamIdx &I) const {
Expand Down

0 comments on commit 24faf3b

Please sign in to comment.