Changeset e0115286 for src/AST/Fwd.hpp
- Timestamp:
- May 10, 2019, 3:00:41 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2a5e8a6
- Parents:
- 1f93c2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Fwd.hpp
r1f93c2c re0115286 16 16 #pragma once 17 17 18 #include "AST/Node.hpp" 19 18 20 namespace ast { 19 21 20 class Node;21 22 class ParseNode; 22 23 … … 137 138 class TypeSubstitution; 138 139 140 //================================================================================================= 141 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency 142 /// remove only if there is a better solution 143 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with 144 /// forward declarations 145 inline void decrement( const class Node * node, Node::ref_type ref ) { node->decrement(ref); } 146 inline void increment( const class Node * node, Node::ref_type ref ) { node->increment(ref); } 147 inline void increment( const class ParseNode *, Node::ref_type ); 148 inline void decrement( const class ParseNode *, Node::ref_type ); 149 inline void increment( const class Decl *, Node::ref_type ); 150 inline void decrement( const class Decl *, Node::ref_type ); 151 inline void increment( const class DeclWithType *, Node::ref_type ); 152 inline void decrement( const class DeclWithType *, Node::ref_type ); 153 inline void increment( const class ObjectDecl *, Node::ref_type ); 154 inline void decrement( const class ObjectDecl *, Node::ref_type ); 155 inline void increment( const class FunctionDecl *, Node::ref_type ); 156 inline void decrement( const class FunctionDecl *, Node::ref_type ); 157 inline void increment( const class AggregateDecl *, Node::ref_type ); 158 inline void decrement( const class AggregateDecl *, Node::ref_type ); 159 inline void increment( const class StructDecl *, Node::ref_type ); 160 inline void decrement( const class StructDecl *, Node::ref_type ); 161 inline void increment( const class UnionDecl *, Node::ref_type ); 162 inline void decrement( const class UnionDecl *, Node::ref_type ); 163 inline void increment( const class EnumDecl *, Node::ref_type ); 164 inline void decrement( const class EnumDecl *, Node::ref_type ); 165 inline void increment( const class TraitDecl *, Node::ref_type ); 166 inline void decrement( const class TraitDecl *, Node::ref_type ); 167 inline void increment( const class NamedTypeDecl *, Node::ref_type ); 168 inline void decrement( const class NamedTypeDecl *, Node::ref_type ); 169 inline void increment( const class TypeDecl *, Node::ref_type ); 170 inline void decrement( const class TypeDecl *, Node::ref_type ); 171 inline void increment( const class FtypeDecl *, Node::ref_type ); 172 inline void decrement( const class FtypeDecl *, Node::ref_type ); 173 inline void increment( const class DtypeDecl *, Node::ref_type ); 174 inline void decrement( const class DtypeDecl *, Node::ref_type ); 175 inline void increment( const class TypedefDecl *, Node::ref_type ); 176 inline void decrement( const class TypedefDecl *, Node::ref_type ); 177 inline void increment( const class AsmDecl *, Node::ref_type ); 178 inline void decrement( const class AsmDecl *, Node::ref_type ); 179 inline void increment( const class StaticAssertDecl *, Node::ref_type ); 180 inline void decrement( const class StaticAssertDecl *, Node::ref_type ); 181 inline void increment( const class Stmt *, Node::ref_type ); 182 inline void decrement( const class Stmt *, Node::ref_type ); 183 inline void increment( const class CompoundStmt *, Node::ref_type ); 184 inline void decrement( const class CompoundStmt *, Node::ref_type ); 185 inline void increment( const class ExprStmt *, Node::ref_type ); 186 inline void decrement( const class ExprStmt *, Node::ref_type ); 187 inline void increment( const class AsmStmt *, Node::ref_type ); 188 inline void decrement( const class AsmStmt *, Node::ref_type ); 189 inline void increment( const class DirectiveStmt *, Node::ref_type ); 190 inline void decrement( const class DirectiveStmt *, Node::ref_type ); 191 inline void increment( const class IfStmt *, Node::ref_type ); 192 inline void decrement( const class IfStmt *, Node::ref_type ); 193 inline void increment( const class WhileStmt *, Node::ref_type ); 194 inline void decrement( const class WhileStmt *, Node::ref_type ); 195 inline void increment( const class ForStmt *, Node::ref_type ); 196 inline void decrement( const class ForStmt *, Node::ref_type ); 197 inline void increment( const class SwitchStmt *, Node::ref_type ); 198 inline void decrement( const class SwitchStmt *, Node::ref_type ); 199 inline void increment( const class CaseStmt *, Node::ref_type ); 200 inline void decrement( const class CaseStmt *, Node::ref_type ); 201 inline void increment( const class BranchStmt *, Node::ref_type ); 202 inline void decrement( const class BranchStmt *, Node::ref_type ); 203 inline void increment( const class ReturnStmt *, Node::ref_type ); 204 inline void decrement( const class ReturnStmt *, Node::ref_type ); 205 inline void increment( const class ThrowStmt *, Node::ref_type ); 206 inline void decrement( const class ThrowStmt *, Node::ref_type ); 207 inline void increment( const class TryStmt *, Node::ref_type ); 208 inline void decrement( const class TryStmt *, Node::ref_type ); 209 inline void increment( const class CatchStmt *, Node::ref_type ); 210 inline void decrement( const class CatchStmt *, Node::ref_type ); 211 inline void increment( const class FinallyStmt *, Node::ref_type ); 212 inline void decrement( const class FinallyStmt *, Node::ref_type ); 213 inline void increment( const class WaitForStmt *, Node::ref_type ); 214 inline void decrement( const class WaitForStmt *, Node::ref_type ); 215 inline void increment( const class WithStmt *, Node::ref_type ); 216 inline void decrement( const class WithStmt *, Node::ref_type ); 217 inline void increment( const class DeclStmt *, Node::ref_type ); 218 inline void decrement( const class DeclStmt *, Node::ref_type ); 219 inline void increment( const class NullStmt *, Node::ref_type ); 220 inline void decrement( const class NullStmt *, Node::ref_type ); 221 inline void increment( const class ImplicitCtorDtorStmt *, Node::ref_type ); 222 inline void decrement( const class ImplicitCtorDtorStmt *, Node::ref_type ); 223 inline void increment( const class Expr *, Node::ref_type ); 224 inline void decrement( const class Expr *, Node::ref_type ); 225 inline void increment( const class ApplicationExpr *, Node::ref_type ); 226 inline void decrement( const class ApplicationExpr *, Node::ref_type ); 227 inline void increment( const class UntypedExpr *, Node::ref_type ); 228 inline void decrement( const class UntypedExpr *, Node::ref_type ); 229 inline void increment( const class NameExpr *, Node::ref_type ); 230 inline void decrement( const class NameExpr *, Node::ref_type ); 231 inline void increment( const class AddressExpr *, Node::ref_type ); 232 inline void decrement( const class AddressExpr *, Node::ref_type ); 233 inline void increment( const class LabelAddressExpr *, Node::ref_type ); 234 inline void decrement( const class LabelAddressExpr *, Node::ref_type ); 235 inline void increment( const class CastExpr *, Node::ref_type ); 236 inline void decrement( const class CastExpr *, Node::ref_type ); 237 inline void increment( const class KeywordCastExpr *, Node::ref_type ); 238 inline void decrement( const class KeywordCastExpr *, Node::ref_type ); 239 inline void increment( const class VirtualCastExpr *, Node::ref_type ); 240 inline void decrement( const class VirtualCastExpr *, Node::ref_type ); 241 inline void increment( const class MemberExpr *, Node::ref_type ); 242 inline void decrement( const class MemberExpr *, Node::ref_type ); 243 inline void increment( const class UntypedMemberExpr *, Node::ref_type ); 244 inline void decrement( const class UntypedMemberExpr *, Node::ref_type ); 245 inline void increment( const class VariableExpr *, Node::ref_type ); 246 inline void decrement( const class VariableExpr *, Node::ref_type ); 247 inline void increment( const class ConstantExpr *, Node::ref_type ); 248 inline void decrement( const class ConstantExpr *, Node::ref_type ); 249 inline void increment( const class SizeofExpr *, Node::ref_type ); 250 inline void decrement( const class SizeofExpr *, Node::ref_type ); 251 inline void increment( const class AlignofExpr *, Node::ref_type ); 252 inline void decrement( const class AlignofExpr *, Node::ref_type ); 253 inline void increment( const class UntypedOffsetofExpr *, Node::ref_type ); 254 inline void decrement( const class UntypedOffsetofExpr *, Node::ref_type ); 255 inline void increment( const class OffsetofExpr *, Node::ref_type ); 256 inline void decrement( const class OffsetofExpr *, Node::ref_type ); 257 inline void increment( const class OffsetPackExpr *, Node::ref_type ); 258 inline void decrement( const class OffsetPackExpr *, Node::ref_type ); 259 inline void increment( const class AttrExpr *, Node::ref_type ); 260 inline void decrement( const class AttrExpr *, Node::ref_type ); 261 inline void increment( const class LogicalExpr *, Node::ref_type ); 262 inline void decrement( const class LogicalExpr *, Node::ref_type ); 263 inline void increment( const class ConditionalExpr *, Node::ref_type ); 264 inline void decrement( const class ConditionalExpr *, Node::ref_type ); 265 inline void increment( const class CommaExpr *, Node::ref_type ); 266 inline void decrement( const class CommaExpr *, Node::ref_type ); 267 inline void increment( const class TypeExpr *, Node::ref_type ); 268 inline void decrement( const class TypeExpr *, Node::ref_type ); 269 inline void increment( const class AsmExpr *, Node::ref_type ); 270 inline void decrement( const class AsmExpr *, Node::ref_type ); 271 inline void increment( const class ImplicitCopyCtorExpr *, Node::ref_type ); 272 inline void decrement( const class ImplicitCopyCtorExpr *, Node::ref_type ); 273 inline void increment( const class ConstructorExpr *, Node::ref_type ); 274 inline void decrement( const class ConstructorExpr *, Node::ref_type ); 275 inline void increment( const class CompoundLiteralExpr *, Node::ref_type ); 276 inline void decrement( const class CompoundLiteralExpr *, Node::ref_type ); 277 inline void increment( const class UntypedValofExpr *, Node::ref_type ); 278 inline void decrement( const class UntypedValofExpr *, Node::ref_type ); 279 inline void increment( const class RangeExpr *, Node::ref_type ); 280 inline void decrement( const class RangeExpr *, Node::ref_type ); 281 inline void increment( const class UntypedTupleExpr *, Node::ref_type ); 282 inline void decrement( const class UntypedTupleExpr *, Node::ref_type ); 283 inline void increment( const class TupleExpr *, Node::ref_type ); 284 inline void decrement( const class TupleExpr *, Node::ref_type ); 285 inline void increment( const class TupleIndexExpr *, Node::ref_type ); 286 inline void decrement( const class TupleIndexExpr *, Node::ref_type ); 287 inline void increment( const class TupleAssignExpr *, Node::ref_type ); 288 inline void decrement( const class TupleAssignExpr *, Node::ref_type ); 289 inline void increment( const class StmtExpr *, Node::ref_type ); 290 inline void decrement( const class StmtExpr *, Node::ref_type ); 291 inline void increment( const class UniqueExpr *, Node::ref_type ); 292 inline void decrement( const class UniqueExpr *, Node::ref_type ); 293 inline void increment( const class UntypedInitExpr *, Node::ref_type ); 294 inline void decrement( const class UntypedInitExpr *, Node::ref_type ); 295 inline void increment( const class InitExpr *, Node::ref_type ); 296 inline void decrement( const class InitExpr *, Node::ref_type ); 297 inline void increment( const class DeletedExpr *, Node::ref_type ); 298 inline void decrement( const class DeletedExpr *, Node::ref_type ); 299 inline void increment( const class DefaultArgExpr *, Node::ref_type ); 300 inline void decrement( const class DefaultArgExpr *, Node::ref_type ); 301 inline void increment( const class GenericExpr *, Node::ref_type ); 302 inline void decrement( const class GenericExpr *, Node::ref_type ); 303 inline void increment( const class Type *, Node::ref_type ); 304 inline void decrement( const class Type *, Node::ref_type ); 305 inline void increment( const class VoidType *, Node::ref_type ); 306 inline void decrement( const class VoidType *, Node::ref_type ); 307 inline void increment( const class BasicType *, Node::ref_type ); 308 inline void decrement( const class BasicType *, Node::ref_type ); 309 inline void increment( const class PointerType *, Node::ref_type ); 310 inline void decrement( const class PointerType *, Node::ref_type ); 311 inline void increment( const class ArrayType *, Node::ref_type ); 312 inline void decrement( const class ArrayType *, Node::ref_type ); 313 inline void increment( const class ReferenceType *, Node::ref_type ); 314 inline void decrement( const class ReferenceType *, Node::ref_type ); 315 inline void increment( const class QualifiedType *, Node::ref_type ); 316 inline void decrement( const class QualifiedType *, Node::ref_type ); 317 inline void increment( const class FunctionType *, Node::ref_type ); 318 inline void decrement( const class FunctionType *, Node::ref_type ); 319 inline void increment( const class ReferenceToType *, Node::ref_type ); 320 inline void decrement( const class ReferenceToType *, Node::ref_type ); 321 inline void increment( const class StructInstType *, Node::ref_type ); 322 inline void decrement( const class StructInstType *, Node::ref_type ); 323 inline void increment( const class UnionInstType *, Node::ref_type ); 324 inline void decrement( const class UnionInstType *, Node::ref_type ); 325 inline void increment( const class EnumInstType *, Node::ref_type ); 326 inline void decrement( const class EnumInstType *, Node::ref_type ); 327 inline void increment( const class TraitInstType *, Node::ref_type ); 328 inline void decrement( const class TraitInstType *, Node::ref_type ); 329 inline void increment( const class TypeInstType *, Node::ref_type ); 330 inline void decrement( const class TypeInstType *, Node::ref_type ); 331 inline void increment( const class TupleType *, Node::ref_type ); 332 inline void decrement( const class TupleType *, Node::ref_type ); 333 inline void increment( const class TypeofType *, Node::ref_type ); 334 inline void decrement( const class TypeofType *, Node::ref_type ); 335 inline void increment( const class AttrType *, Node::ref_type ); 336 inline void decrement( const class AttrType *, Node::ref_type ); 337 inline void increment( const class VarArgsType *, Node::ref_type ); 338 inline void decrement( const class VarArgsType *, Node::ref_type ); 339 inline void increment( const class ZeroType *, Node::ref_type ); 340 inline void decrement( const class ZeroType *, Node::ref_type ); 341 inline void increment( const class OneType *, Node::ref_type ); 342 inline void decrement( const class OneType *, Node::ref_type ); 343 inline void increment( const class GlobalScopeType *, Node::ref_type ); 344 inline void decrement( const class GlobalScopeType *, Node::ref_type ); 345 inline void increment( const class Designation *, Node::ref_type ); 346 inline void decrement( const class Designation *, Node::ref_type ); 347 inline void increment( const class Init *, Node::ref_type ); 348 inline void decrement( const class Init *, Node::ref_type ); 349 inline void increment( const class SingleInit *, Node::ref_type ); 350 inline void decrement( const class SingleInit *, Node::ref_type ); 351 inline void increment( const class ListInit *, Node::ref_type ); 352 inline void decrement( const class ListInit *, Node::ref_type ); 353 inline void increment( const class ConstructorInit *, Node::ref_type ); 354 inline void decrement( const class ConstructorInit *, Node::ref_type ); 355 inline void increment( const class Constant *, Node::ref_type ); 356 inline void decrement( const class Constant *, Node::ref_type ); 357 inline void increment( const class Label *, Node::ref_type ); 358 inline void decrement( const class Label *, Node::ref_type ); 359 inline void increment( const class Attribute *, Node::ref_type ); 360 inline void decrement( const class Attribute *, Node::ref_type ); 361 inline void increment( const class TypeSubstitution *, Node::ref_type ); 362 inline void decrement( const class TypeSubstitution *, Node::ref_type ); 363 139 364 typedef unsigned int UniqueId; 140 365
Note: See TracChangeset
for help on using the changeset viewer.