1class AttrSubject;
2
3class Decl<bit abstract = 0> : AttrSubject {
4  bit Abstract = abstract;
5}
6
7class DDecl<Decl base, bit abstract = 0> : Decl<abstract> {
8  Decl Base = base;
9}
10
11class DeclContext { }
12
13def TranslationUnit : Decl, DeclContext;
14def PragmaComment : Decl;
15def PragmaDetectMismatch : Decl;
16def ExternCContext : Decl, DeclContext;
17def Named : Decl<1>;
18  def Namespace : DDecl<Named>, DeclContext;
19  def UsingDirective : DDecl<Named>;
20  def NamespaceAlias : DDecl<Named>;
21  def Label : DDecl<Named>;
22  def Type : DDecl<Named, 1>;
23    def TypedefName : DDecl<Type, 1>;
24      def Typedef : DDecl<TypedefName>;
25      def TypeAlias : DDecl<TypedefName>;
26      def ObjCTypeParam : DDecl<TypedefName>;
27    def UnresolvedUsingTypename : DDecl<Type>;
28    def Tag : DDecl<Type, 1>, DeclContext;
29      def Enum : DDecl<Tag>;
30      def Record : DDecl<Tag>;
31        def CXXRecord : DDecl<Record>;
32          def ClassTemplateSpecialization : DDecl<CXXRecord>;
33            def ClassTemplatePartialSpecialization
34              : DDecl<ClassTemplateSpecialization>;
35    def TemplateTypeParm : DDecl<Type>;
36  def Value : DDecl<Named, 1>;
37    def EnumConstant : DDecl<Value>;
38    def UnresolvedUsingValue : DDecl<Value>;
39    def IndirectField : DDecl<Value>;
40    def OMPDeclareReduction : DDecl<Value>, DeclContext;
41    def Declarator : DDecl<Value, 1>;
42      def Field : DDecl<Declarator>;
43        def ObjCIvar : DDecl<Field>;
44        def ObjCAtDefsField : DDecl<Field>;
45      def MSProperty : DDecl<Declarator>;
46      def Function : DDecl<Declarator>, DeclContext;
47        def CXXMethod : DDecl<Function>;
48          def CXXConstructor : DDecl<CXXMethod>;
49          def CXXDestructor : DDecl<CXXMethod>;
50          def CXXConversion : DDecl<CXXMethod>;
51      def Var : DDecl<Declarator>;
52        def VarTemplateSpecialization : DDecl<Var>;
53          def VarTemplatePartialSpecialization
54            : DDecl<VarTemplateSpecialization>;
55        def ImplicitParam : DDecl<Var>;
56        def ParmVar : DDecl<Var>;
57        def OMPCapturedExpr : DDecl<Var>;
58      def NonTypeTemplateParm : DDecl<Declarator>;
59  def Template : DDecl<Named, 1>;
60    def RedeclarableTemplate : DDecl<Template, 1>;
61      def FunctionTemplate : DDecl<RedeclarableTemplate>;
62      def ClassTemplate : DDecl<RedeclarableTemplate>;
63      def VarTemplate : DDecl<RedeclarableTemplate>;
64      def TypeAliasTemplate : DDecl<RedeclarableTemplate>;
65    def TemplateTemplateParm : DDecl<Template>;
66    def BuiltinTemplate : DDecl<Template>;
67  def Using : DDecl<Named>;
68  def UsingShadow : DDecl<Named>;
69    def ConstructorUsingShadow : DDecl<UsingShadow>;
70  def ObjCMethod : DDecl<Named>, DeclContext;
71  def ObjCContainer : DDecl<Named, 1>, DeclContext;
72    def ObjCCategory : DDecl<ObjCContainer>;
73    def ObjCProtocol : DDecl<ObjCContainer>;
74    def ObjCInterface : DDecl<ObjCContainer>;
75    def ObjCImpl : DDecl<ObjCContainer, 1>;
76      def ObjCCategoryImpl : DDecl<ObjCImpl>;
77      def ObjCImplementation : DDecl<ObjCImpl>;
78  def ObjCProperty : DDecl<Named>;
79  def ObjCCompatibleAlias : DDecl<Named>;
80def LinkageSpec : Decl, DeclContext;
81def ObjCPropertyImpl : Decl;
82def FileScopeAsm : Decl;
83def AccessSpec : Decl;
84def Friend : Decl;
85def FriendTemplate : Decl;
86def StaticAssert : Decl;
87def Block : Decl, DeclContext;
88def Captured : Decl, DeclContext;
89def ClassScopeFunctionSpecialization : Decl;
90def Import : Decl;
91def OMPThreadPrivate : Decl;
92def Empty : Decl;
93
94