3838#define CONTEXT_DECL (Id, Parent ) DECL(Id, Parent)
3939#endif
4040
41+ // / ABSTRACT_CONTEXT_DECL(Id, Parent)
42+ // / Used for abstract Decls that are also DeclContexts.
43+ // /
44+ #ifndef ABSTRACT_CONTEXT_DECL
45+ #define ABSTRACT_CONTEXT_DECL (Id, Parent ) ABSTRACT_DECL(Id, Parent)
46+ #endif
47+
4148// / ITERABLE_NONGENERIC_DECL(Id, Parent)
4249// / Used for Decls that are also IterableDeclContexts and DeclContexts. The
4350// / default behavior is to do the same as for CONTEXT_DECL. This combination
145152
146153ABSTRACT_DECL (Value, Decl)
147154 ABSTRACT_DECL(Type, ValueDecl)
148- ABSTRACT_DECL (GenericType, TypeDecl)
149- ABSTRACT_DECL (NominalType, GenericTypeDecl)
155+ ABSTRACT_CONTEXT_DECL (GenericType, TypeDecl)
156+ ABSTRACT_CONTEXT_DECL (NominalType, GenericTypeDecl)
150157 NOMINAL_TYPE_DECL(Enum, NominalTypeDecl)
151158 NOMINAL_TYPE_DECL(Struct, NominalTypeDecl)
152159 NOMINAL_TYPE_DECL(Class, NominalTypeDecl)
@@ -165,7 +172,7 @@ ABSTRACT_DECL(Value, Decl)
165172 VALUE_DECL(Param, VarDecl)
166173 GENERIC_VALUE_DECL(Subscript, AbstractStorageDecl)
167174 DECL_RANGE(AbstractStorage, Var, Subscript)
168- ABSTRACT_DECL (AbstractFunction, ValueDecl)
175+ ABSTRACT_CONTEXT_DECL (AbstractFunction, ValueDecl)
169176 ABSTRACT_FUNCTION_DECL(Constructor, AbstractFunctionDecl)
170177 ABSTRACT_FUNCTION_DECL(Destructor, AbstractFunctionDecl)
171178 ABSTRACT_FUNCTION_DECL(Func, AbstractFunctionDecl)
@@ -208,6 +215,7 @@ LAST_DECL(MacroExpansion)
208215#undef ABSTRACT_FUNCTION_DECL
209216#undef VALUE_DECL
210217#undef DECL_RANGE
218+ #undef ABSTRACT_CONTEXT_DECL
211219#undef ABSTRACT_DECL
212220#undef OPERATOR_DECL
213221#undef DECL
0 commit comments