]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/clang/include/clang/Basic/DeclNodes.td
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / clang / include / clang / Basic / DeclNodes.td
1 include "clang/Basic/ASTNode.td"
2
3 class DeclNode<DeclNode base, string diagSpelling = "", bit abstract = 0>
4     : ASTNode, AttrSubject {
5   DeclNode Base = base;
6   bit Abstract = abstract;
7   string DiagSpelling = diagSpelling;
8 }
9
10 class DeclContext {}
11
12 def Decl : DeclNode<?, "", 1>;
13 def TranslationUnit : DeclNode<Decl>, DeclContext;
14 def PragmaComment : DeclNode<Decl>;
15 def PragmaDetectMismatch : DeclNode<Decl>;
16 def ExternCContext : DeclNode<Decl>, DeclContext;
17 def Named : DeclNode<Decl, "named declarations", 1>;
18   def Namespace : DeclNode<Named, "namespaces">, DeclContext;
19   def UsingDirective : DeclNode<Named>;
20   def NamespaceAlias : DeclNode<Named>;
21   def Label : DeclNode<Named, "labels">;
22   def Type : DeclNode<Named, "types", 1>;
23     def TypedefName : DeclNode<Type, "typedefs", 1>;
24       def Typedef : DeclNode<TypedefName>;
25       def TypeAlias : DeclNode<TypedefName>;
26       def ObjCTypeParam : DeclNode<TypedefName>;
27     def UnresolvedUsingTypename : DeclNode<Type>;
28     def Tag : DeclNode<Type, "tag types", 1>, DeclContext;
29       def Enum : DeclNode<Tag, "enums">;
30       def Record : DeclNode<Tag, "structs, unions, classes">;
31         def CXXRecord : DeclNode<Record, "classes">;
32           def ClassTemplateSpecialization : DeclNode<CXXRecord>;
33             def ClassTemplatePartialSpecialization
34               : DeclNode<ClassTemplateSpecialization>;
35     def TemplateTypeParm : DeclNode<Type>;
36   def Value : DeclNode<Named, "value declarations", 1>;
37     def EnumConstant : DeclNode<Value, "enumerators">;
38     def UnresolvedUsingValue : DeclNode<Value>;
39     def IndirectField : DeclNode<Value>;
40     def Binding : DeclNode<Value>;
41     def OMPDeclareReduction : DeclNode<Value>, DeclContext;
42     def OMPDeclareMapper : DeclNode<Value>, DeclContext;
43     def Declarator : DeclNode<Value, "declarators", 1>;
44       def Field : DeclNode<Declarator, "non-static data members">;
45         def ObjCIvar : DeclNode<Field>;
46         def ObjCAtDefsField : DeclNode<Field>;
47       def MSProperty : DeclNode<Declarator>;
48       def Function : DeclNode<Declarator, "functions">, DeclContext;
49         def CXXDeductionGuide : DeclNode<Function>;
50         def CXXMethod : DeclNode<Function>;
51           def CXXConstructor : DeclNode<CXXMethod>;
52           def CXXDestructor : DeclNode<CXXMethod>;
53           def CXXConversion : DeclNode<CXXMethod>;
54       def Var : DeclNode<Declarator, "variables">;
55         def VarTemplateSpecialization : DeclNode<Var>;
56           def VarTemplatePartialSpecialization
57             : DeclNode<VarTemplateSpecialization>;
58         def ImplicitParam : DeclNode<Var>;
59         def ParmVar : DeclNode<Var, "parameters">;
60         def Decomposition : DeclNode<Var>;
61         def OMPCapturedExpr : DeclNode<Var>;
62       def NonTypeTemplateParm : DeclNode<Declarator>;
63   def Template : DeclNode<Named, "templates", 1>;
64     def RedeclarableTemplate : DeclNode<Template, "redeclarable templates", 1>;
65       def FunctionTemplate : DeclNode<RedeclarableTemplate>;
66       def ClassTemplate : DeclNode<RedeclarableTemplate>;
67       def VarTemplate : DeclNode<RedeclarableTemplate>;
68       def TypeAliasTemplate : DeclNode<RedeclarableTemplate>;
69     def TemplateTemplateParm : DeclNode<Template>;
70     def BuiltinTemplate : DeclNode<Template>;
71     def Concept : DeclNode<Template>;
72   def Using : DeclNode<Named>;
73   def UsingPack : DeclNode<Named>;
74   def UsingShadow : DeclNode<Named>;
75     def ConstructorUsingShadow : DeclNode<UsingShadow>;
76   def ObjCMethod : DeclNode<Named, "Objective-C methods">, DeclContext;
77   def ObjCContainer : DeclNode<Named, "Objective-C containers", 1>, DeclContext;
78     def ObjCCategory : DeclNode<ObjCContainer>;
79     def ObjCProtocol : DeclNode<ObjCContainer, "Objective-C protocols">;
80     def ObjCInterface : DeclNode<ObjCContainer, "Objective-C interfaces">;
81     def ObjCImpl
82         : DeclNode<ObjCContainer, "Objective-C implementation declarations", 1>;
83       def ObjCCategoryImpl : DeclNode<ObjCImpl>;
84       def ObjCImplementation : DeclNode<ObjCImpl>;
85   def ObjCProperty : DeclNode<Named, "Objective-C properties">;
86   def ObjCCompatibleAlias : DeclNode<Named>;
87 def LinkageSpec : DeclNode<Decl>, DeclContext;
88 def Export : DeclNode<Decl>, DeclContext;
89 def ObjCPropertyImpl : DeclNode<Decl>;
90 def FileScopeAsm : DeclNode<Decl>;
91 def AccessSpec : DeclNode<Decl>;
92 def Friend : DeclNode<Decl>;
93 def FriendTemplate : DeclNode<Decl>;
94 def StaticAssert : DeclNode<Decl>;
95 def Block : DeclNode<Decl, "blocks">, DeclContext;
96 def Captured : DeclNode<Decl>, DeclContext;
97 def ClassScopeFunctionSpecialization : DeclNode<Decl>;
98 def Import : DeclNode<Decl>;
99 def OMPThreadPrivate : DeclNode<Decl>;
100 def OMPAllocate : DeclNode<Decl>;
101 def OMPRequires : DeclNode<Decl>;
102 def Empty : DeclNode<Decl>;
103 def RequiresExprBody : DeclNode<Decl>, DeclContext;
104 def LifetimeExtendedTemporary : DeclNode<Decl>;
105