Allow returning something of type void in a function that returns void
[delight/core.git] / dmd2 / declaration.h
blobfeb0f84135864bb1e7cd57d37f3492909ae00c09
2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2008 by Digital Mars
4 // All Rights Reserved
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
11 /* NOTE: This file has been patched from the original DMD distribution to
12 work with the GDC compiler.
14 Modified by David Friedman, December 2006
17 #ifndef DMD_DECLARATION_H
18 #define DMD_DECLARATION_H
20 #ifdef __DMC__
21 #pragma once
22 #endif /* __DMC__ */
24 #include "dsymbol.h"
25 #include "lexer.h"
26 #include "mtype.h"
28 struct Expression;
29 struct Statement;
30 struct LabelDsymbol;
31 struct Initializer;
32 struct Module;
33 struct InlineScanState;
34 struct ForeachStatement;
35 struct FuncDeclaration;
36 struct ExpInitializer;
37 struct StructDeclaration;
38 struct TupleType;
39 struct InterState;
40 struct IRState;
42 enum PROT;
43 enum LINK;
44 enum TOK;
45 enum MATCH;
47 enum STC
49 STCundefined = 0,
50 STCstatic = 1,
51 STCextern = 2,
52 STCconst = 4,
53 STCfinal = 8,
54 STCabstract = 0x10,
55 STCparameter = 0x20,
56 STCfield = 0x40,
57 STCoverride = 0x80,
58 STCauto = 0x100,
59 STCsynchronized = 0x200,
60 STCdeprecated = 0x400,
61 STCin = 0x800, // in parameter
62 STCout = 0x1000, // out parameter
63 STClazy = 0x2000, // lazy parameter
64 STCforeach = 0x4000, // variable for foreach loop
65 STCcomdat = 0x8000, // should go into COMDAT record
66 STCvariadic = 0x10000, // variadic function argument
67 STCctorinit = 0x20000, // can only be set inside constructor
68 STCtemplateparameter = 0x40000, // template parameter
69 STCscope = 0x80000, // template parameter
70 STCinvariant = 0x100000,
71 STCref = 0x200000,
72 STCinit = 0x400000, // has explicit initializer
73 STCmanifest = 0x800000, // manifest constant
74 STCnodtor = 0x1000000, // don't run destructor
75 STCnothrow = 0x2000000, // never throws exceptions
76 STCpure = 0x4000000, // pure function
77 STCtls = 0x8000000, // thread local
78 STCinject = 0x10000000, // injected dependency
81 struct Match
83 int count; // number of matches found
84 MATCH last; // match level of lastf
85 FuncDeclaration *lastf; // last matching function we found
86 FuncDeclaration *nextf; // current matching function
87 FuncDeclaration *anyf; // pick a func, any func, to use for error recovery
90 void overloadResolveX(Match *m, FuncDeclaration *f,
91 Expression *ethis, Expressions *arguments);
92 int overloadApply(FuncDeclaration *fstart,
93 int (*fp)(void *, FuncDeclaration *),
94 void *param);
96 /**************************************************************/
98 struct Declaration : Dsymbol
100 Type *type;
101 Type *originalType; // before semantic analysis
102 unsigned storage_class;
103 enum PROT protection;
104 enum LINK linkage;
105 Expressions * attributes; // GCC decl/type attributes
107 Declaration(Identifier *id);
108 void semantic(Scope *sc);
109 char *kind();
110 target_size_t size(Loc loc);
111 void checkModify(Loc loc, Scope *sc, Type *t);
113 void emitComment(Scope *sc);
114 void toDocBuffer(OutBuffer *buf);
116 char *mangle();
117 int isStatic() { return storage_class & STCstatic; }
118 virtual int isStaticConstructor();
119 virtual int isStaticDestructor();
120 virtual int isDelete();
121 virtual int isDataseg();
122 virtual int isCodeseg();
123 int isCtorinit() { return storage_class & STCctorinit; }
124 int isFinal() { return storage_class & STCfinal; }
125 int isAbstract() { return storage_class & STCabstract; }
126 int isConst() { return storage_class & STCconst; }
127 int isInvariant() { return storage_class & STCinvariant; }
128 int isAuto() { return storage_class & STCauto; }
129 int isScope() { return storage_class & (STCscope | STCauto); }
130 int isSynchronized() { return storage_class & STCsynchronized; }
131 int isParameter() { return storage_class & STCparameter; }
132 int isDeprecated() { return storage_class & STCdeprecated; }
133 int isOverride() { return storage_class & STCoverride; }
135 int isIn() { return storage_class & STCin; }
136 int isOut() { return storage_class & STCout; }
137 int isRef() { return storage_class & STCref; }
139 enum PROT prot();
141 Declaration *isDeclaration() { return this; }
144 /**************************************************************/
146 struct TupleDeclaration : Declaration
148 Objects *objects;
149 int isexp; // 1: expression tuple
151 TypeTuple *tupletype; // !=NULL if this is a type tuple
153 TupleDeclaration(Loc loc, Identifier *ident, Objects *objects);
154 Dsymbol *syntaxCopy(Dsymbol *);
155 char *kind();
156 Type *getType();
157 int needThis();
159 TupleDeclaration *isTupleDeclaration() { return this; }
162 /**************************************************************/
164 struct TypedefDeclaration : Declaration
166 Type *basetype;
167 Initializer *init;
168 int sem; // 0: semantic() has not been run
169 // 1: semantic() is in progress
170 // 2: semantic() has been run
171 // 3: semantic2() has been run
172 int inuse; // used to detect typedef cycles
174 TypedefDeclaration(Loc loc, Identifier *ident, Type *basetype, Initializer *init);
175 Dsymbol *syntaxCopy(Dsymbol *);
176 void semantic(Scope *sc);
177 void semantic2(Scope *sc);
178 char *mangle();
179 char *kind();
180 Type *getType();
181 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
182 #ifdef _DH
183 Type *htype;
184 Type *hbasetype;
185 #endif
187 void toDocBuffer(OutBuffer *buf);
189 void toObjFile(int multiobj); // compile to .obj file
190 void toDebug();
191 int cvMember(unsigned char *p);
193 TypedefDeclaration *isTypedefDeclaration() { return this; }
195 Symbol *sinit;
196 Symbol *toInitializer();
199 /**************************************************************/
201 struct AliasDeclaration : Declaration
203 Dsymbol *aliassym;
204 Dsymbol *overnext; // next in overload list
205 int inSemantic;
207 AliasDeclaration(Loc loc, Identifier *ident, Type *type);
208 AliasDeclaration(Loc loc, Identifier *ident, Dsymbol *s);
209 Dsymbol *syntaxCopy(Dsymbol *);
210 void semantic(Scope *sc);
211 int overloadInsert(Dsymbol *s);
212 char *kind();
213 Type *getType();
214 Dsymbol *toAlias();
215 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
216 #ifdef _DH
217 Type *htype;
218 Dsymbol *haliassym;
219 #endif
221 void toDocBuffer(OutBuffer *buf);
223 AliasDeclaration *isAliasDeclaration() { return this; }
226 /**************************************************************/
228 struct VarDeclaration : Declaration
230 Initializer *init;
231 target_size_t offset;
232 int noauto; // no auto semantics
233 FuncDeclarations nestedrefs; // referenced by these lexically nested functions
234 int inuse;
235 int ctorinit; // it has been initialized in a ctor
236 int onstack; // 1: it has been allocated on the stack
237 // 2: on stack, run destructor anyway
238 int canassign; // it can be assigned to
239 Dsymbol *aliassym; // if redone as alias to another symbol
240 Expression *value; // when interpreting, this is the value
241 // (NULL if value not determinable)
242 Scope *scope; // !=NULL means context to use
244 // If this turns out to be a pointer or class, make sure it's initialised
245 // Used to ensure non-null variables get initialised in Delight
246 bool requirePointerInit;
248 // Reject static variables (during semantic pass)
249 bool dltNormalMode;
251 VarDeclaration(Loc loc, Type *t, Identifier *id, Initializer *init);
252 Dsymbol *syntaxCopy(Dsymbol *);
253 void semantic(Scope *sc);
254 void semantic2(Scope *sc);
255 char *kind();
256 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
257 #ifdef _DH
258 Type *htype;
259 Initializer *hinit;
260 #endif
261 int needThis();
262 int isImportedSymbol();
263 int isDataseg();
264 int hasPointers();
265 int canTakeAddressOf();
266 int needsAutoDtor();
267 Expression *callAutoDtor(Scope *sc);
268 ExpInitializer *getExpInitializer();
269 Expression *getConstInitializer();
270 void checkCtorConstInit();
271 void checkNestedReference(Scope *sc, Loc loc);
272 Dsymbol *toAlias();
274 Symbol *toSymbol();
275 void toObjFile(int multiobj); // compile to .obj file
276 int cvMember(unsigned char *p);
278 // Eliminate need for dynamic_cast
279 VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; }
283 /**************************************************************/
285 // This is a shell around a back end symbol
287 struct SymbolDeclaration : Declaration
289 Symbol *sym;
290 StructDeclaration *dsym;
292 SymbolDeclaration(Loc loc, Symbol *s, StructDeclaration *dsym);
294 Symbol *toSymbol();
296 // Eliminate need for dynamic_cast
297 SymbolDeclaration *isSymbolDeclaration() { return (SymbolDeclaration *)this; }
300 struct ClassInfoDeclaration : VarDeclaration
302 ClassDeclaration *cd;
304 ClassInfoDeclaration(ClassDeclaration *cd);
305 Dsymbol *syntaxCopy(Dsymbol *);
306 void semantic(Scope *sc);
308 void emitComment(Scope *sc);
310 Symbol *toSymbol();
313 struct ModuleInfoDeclaration : VarDeclaration
315 Module *mod;
317 ModuleInfoDeclaration(Module *mod);
318 Dsymbol *syntaxCopy(Dsymbol *);
319 void semantic(Scope *sc);
321 void emitComment(Scope *sc);
323 Symbol *toSymbol();
326 struct TypeInfoDeclaration : VarDeclaration
328 Type *tinfo;
330 TypeInfoDeclaration(Type *tinfo, int internal);
331 Dsymbol *syntaxCopy(Dsymbol *);
332 void semantic(Scope *sc);
334 void emitComment(Scope *sc);
336 Symbol *toSymbol();
337 void toObjFile(int multiobj); // compile to .obj file
338 virtual void toDt(dt_t **pdt);
341 struct TypeInfoStructDeclaration : TypeInfoDeclaration
343 TypeInfoStructDeclaration(Type *tinfo);
345 void toDt(dt_t **pdt);
348 struct TypeInfoClassDeclaration : TypeInfoDeclaration
350 TypeInfoClassDeclaration(Type *tinfo);
352 void toDt(dt_t **pdt);
355 struct TypeInfoInterfaceDeclaration : TypeInfoDeclaration
357 TypeInfoInterfaceDeclaration(Type *tinfo);
359 void toDt(dt_t **pdt);
362 struct TypeInfoTypedefDeclaration : TypeInfoDeclaration
364 TypeInfoTypedefDeclaration(Type *tinfo);
366 void toDt(dt_t **pdt);
369 struct TypeInfoPointerDeclaration : TypeInfoDeclaration
371 TypeInfoPointerDeclaration(Type *tinfo);
373 void toDt(dt_t **pdt);
376 struct TypeInfoMaybeDeclaration : TypeInfoDeclaration
378 TypeInfoMaybeDeclaration(Type *tinfo);
380 void toDt(dt_t **pdt);
383 struct TypeInfoArrayDeclaration : TypeInfoDeclaration
385 TypeInfoArrayDeclaration(Type *tinfo);
387 void toDt(dt_t **pdt);
390 struct TypeInfoStaticArrayDeclaration : TypeInfoDeclaration
392 TypeInfoStaticArrayDeclaration(Type *tinfo);
394 void toDt(dt_t **pdt);
397 struct TypeInfoAssociativeArrayDeclaration : TypeInfoDeclaration
399 TypeInfoAssociativeArrayDeclaration(Type *tinfo);
401 void toDt(dt_t **pdt);
404 struct TypeInfoEnumDeclaration : TypeInfoDeclaration
406 TypeInfoEnumDeclaration(Type *tinfo);
408 void toDt(dt_t **pdt);
411 struct TypeInfoFunctionDeclaration : TypeInfoDeclaration
413 TypeInfoFunctionDeclaration(Type *tinfo);
415 void toDt(dt_t **pdt);
418 struct TypeInfoDelegateDeclaration : TypeInfoDeclaration
420 TypeInfoDelegateDeclaration(Type *tinfo);
422 void toDt(dt_t **pdt);
425 struct TypeInfoTupleDeclaration : TypeInfoDeclaration
427 TypeInfoTupleDeclaration(Type *tinfo);
429 void toDt(dt_t **pdt);
432 #if V2
433 struct TypeInfoConstDeclaration : TypeInfoDeclaration
435 TypeInfoConstDeclaration(Type *tinfo);
437 void toDt(dt_t **pdt);
440 struct TypeInfoInvariantDeclaration : TypeInfoDeclaration
442 TypeInfoInvariantDeclaration(Type *tinfo);
444 void toDt(dt_t **pdt);
446 #endif
448 /**************************************************************/
450 struct ThisDeclaration : VarDeclaration
452 ThisDeclaration(Type *t);
453 Dsymbol *syntaxCopy(Dsymbol *);
456 enum ILS
458 ILSuninitialized, // not computed yet
459 ILSno, // cannot inline
460 ILSyes, // can inline
463 /**************************************************************/
464 #if V2
466 enum BUILTIN
468 BUILTINunknown = -1, // not known if this is a builtin
469 BUILTINnot, // this is not a builtin
470 BUILTINsin, // std.math.sin
471 BUILTINcos, // std.math.cos
472 BUILTINtan, // std.math.tan
473 BUILTINsqrt, // std.math.sqrt
474 BUILTINfabs, // std.math.fabs
477 Expression *eval_builtin(enum BUILTIN builtin, Expressions *arguments);
479 #endif
481 struct FuncDeclaration : Declaration
483 Array *fthrows; // Array of Type's of exceptions (not used)
484 Statement *frequire;
485 Statement *fensure;
486 Statement *fbody;
488 Identifier *outId; // identifier for out statement
489 VarDeclaration *vresult; // variable corresponding to outId
490 LabelDsymbol *returnLabel; // where the return goes
492 DsymbolTable *localsymtab; // used to prevent symbols in different
493 // scopes from having the same name
494 VarDeclaration *vthis; // 'this' parameter (member and nested)
495 VarDeclaration *v_arguments; // '_arguments' parameter
496 #if IN_GCC
497 VarDeclaration *v_arguments_var; // '_arguments' variable
498 VarDeclaration *v_argptr; // '_argptr' variable
499 #endif
500 Dsymbols *parameters; // Array of VarDeclaration's for parameters
501 DsymbolTable *labtab; // statement label symbol table
502 Declaration *overnext; // next in overload list
503 Loc endloc; // location of closing curly bracket
504 int vtblIndex; // for member functions, index into vtbl[]
505 int naked; // !=0 if naked
506 int inlineAsm; // !=0 if has inline assembler
507 ILS inlineStatus;
508 int inlineNest; // !=0 if nested inline
509 int cantInterpret; // !=0 if cannot interpret function
510 int semanticRun; // !=0 if semantic3() had been run
511 // this function's frame ptr
512 ForeachStatement *fes; // if foreach body, this is the foreach
513 int introducing; // !=0 if 'introducing' function
514 Type *tintro; // if !=NULL, then this is the type
515 // of the 'introducing' function
516 // this one is overriding
517 int inferRetType; // !=0 if return type is to be inferred
518 Scope *scope; // !=NULL means context to use
520 // Things that should really go into Scope
521 int hasReturnExp; // 1 if there's a return exp; statement
522 // 2 if there's a throw statement
523 // 4 if there's an assert(0)
524 // 8 if there's inline asm
526 // Support for NRVO (named return value optimization)
527 int nrvo_can; // !=0 means we can do it
528 VarDeclaration *nrvo_var; // variable to replace with shidden
529 Symbol *shidden; // hidden pointer passed to function
531 #if V2
532 enum BUILTIN builtin; // set if this is a known, builtin
533 // function we can evaluate at compile
534 // time
536 int tookAddressOf; // set if someone took the address of
537 // this function
538 Dsymbols closureVars; // local variables in this function
539 // which are referenced by nested
540 // functions
541 #else
542 int nestedFrameRef; // !=0 if nested variables referenced
543 #endif
545 FuncDeclaration(Loc loc, Loc endloc, Identifier *id, enum STC storage_class, Type *type);
546 Dsymbol *syntaxCopy(Dsymbol *);
547 void semantic(Scope *sc);
548 void semantic2(Scope *sc);
549 void semantic3(Scope *sc);
550 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
551 void bodyToCBuffer(OutBuffer *buf, HdrGenState *hgs);
552 int overrides(FuncDeclaration *fd);
553 int findVtblIndex(Array *vtbl, int dim);
554 int overloadInsert(Dsymbol *s);
555 FuncDeclaration *overloadExactMatch(Type *t);
556 FuncDeclaration *overloadResolve(Loc loc, Expression *ethis, Expressions *arguments, int flags = 0);
557 MATCH leastAsSpecialized(FuncDeclaration *g);
558 LabelDsymbol *searchLabel(Identifier *ident);
559 AggregateDeclaration *isThis();
560 AggregateDeclaration *isMember2();
561 int getLevel(Loc loc, FuncDeclaration *fd); // lexical nesting level difference
562 void appendExp(Expression *e);
563 void appendState(Statement *s);
564 char *mangle();
565 int isMain();
566 int isWinMain();
567 int isDllMain();
568 enum BUILTIN isBuiltin();
569 int isExport();
570 int isImportedSymbol();
571 int isAbstract();
572 int isCodeseg();
573 int isOverloadable();
574 virtual int isNested();
575 int needThis();
576 virtual int isVirtual();
577 virtual int isFinal();
578 virtual int addPreInvariant();
579 virtual int addPostInvariant();
580 Expression *interpret(InterState *istate, Expressions *arguments);
581 void inlineScan();
582 int canInline(int hasthis, int hdrscan = 0);
583 Expression *doInline(InlineScanState *iss, Expression *ethis, Array *arguments);
584 char *kind();
585 void toDocBuffer(OutBuffer *buf);
586 FuncDeclaration *isUnique();
587 int needsClosure();
589 static FuncDeclaration *genCfunc(Type *treturn, char *name,
590 Type *t1 = 0, Type *t2 = 0, Type *t3 = 0);
591 static FuncDeclaration *genCfunc(Type *treturn, Identifier *id,
592 Type *t1 = 0, Type *t2 = 0, Type *t3 = 0);
594 Symbol *toSymbol();
595 Symbol *toThunkSymbol(target_ptrdiff_t offset); // thunk version
596 void toObjFile(int multiobj); // compile to .obj file
597 int cvMember(unsigned char *p);
598 void buildClosure(IRState *irs);
600 FuncDeclaration *isFuncDeclaration() { return this; }
603 struct FuncAliasDeclaration : FuncDeclaration
605 FuncDeclaration *funcalias;
607 FuncAliasDeclaration(FuncDeclaration *funcalias);
609 FuncAliasDeclaration *isFuncAliasDeclaration() { return this; }
610 char *kind();
611 Symbol *toSymbol();
614 struct FuncLiteralDeclaration : FuncDeclaration
616 enum TOK tok; // TOKfunction or TOKdelegate
618 FuncLiteralDeclaration(Loc loc, Loc endloc, Type *type, enum TOK tok,
619 ForeachStatement *fes);
620 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
621 Dsymbol *syntaxCopy(Dsymbol *);
622 int isNested();
624 FuncLiteralDeclaration *isFuncLiteralDeclaration() { return this; }
625 char *kind();
628 struct CtorDeclaration : FuncDeclaration
629 { Arguments *arguments;
630 int varargs;
632 CtorDeclaration(Loc loc, Loc endloc, Arguments *arguments, int varargs);
633 Dsymbol *syntaxCopy(Dsymbol *);
634 void semantic(Scope *sc);
635 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
636 char *kind();
637 char *toChars();
638 int isVirtual();
639 int addPreInvariant();
640 int addPostInvariant();
641 void toDocBuffer(OutBuffer *buf);
643 CtorDeclaration *isCtorDeclaration() { return this; }
646 struct PostBlitDeclaration : FuncDeclaration
648 PostBlitDeclaration(Loc loc, Loc endloc);
649 PostBlitDeclaration(Loc loc, Loc endloc, Identifier *id);
650 Dsymbol *syntaxCopy(Dsymbol *);
651 void semantic(Scope *sc);
652 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
653 int isVirtual();
654 int addPreInvariant();
655 int addPostInvariant();
656 int overloadInsert(Dsymbol *s);
657 void emitComment(Scope *sc);
659 PostBlitDeclaration *isPostBlitDeclaration() { return this; }
662 struct DtorDeclaration : FuncDeclaration
664 DtorDeclaration(Loc loc, Loc endloc);
665 DtorDeclaration(Loc loc, Loc endloc, Identifier *id);
666 Dsymbol *syntaxCopy(Dsymbol *);
667 void semantic(Scope *sc);
668 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
669 int isVirtual();
670 int addPreInvariant();
671 int addPostInvariant();
672 int overloadInsert(Dsymbol *s);
673 void emitComment(Scope *sc);
675 DtorDeclaration *isDtorDeclaration() { return this; }
678 struct StaticCtorDeclaration : FuncDeclaration
680 StaticCtorDeclaration(Loc loc, Loc endloc);
681 Dsymbol *syntaxCopy(Dsymbol *);
682 void semantic(Scope *sc);
683 AggregateDeclaration *isThis();
684 int isStaticConstructor();
685 int isVirtual();
686 int addPreInvariant();
687 int addPostInvariant();
688 void emitComment(Scope *sc);
689 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
691 StaticCtorDeclaration *isStaticCtorDeclaration() { return this; }
694 struct StaticDtorDeclaration : FuncDeclaration
696 StaticDtorDeclaration(Loc loc, Loc endloc);
697 Dsymbol *syntaxCopy(Dsymbol *);
698 void semantic(Scope *sc);
699 AggregateDeclaration *isThis();
700 int isStaticDestructor();
701 int isVirtual();
702 int addPreInvariant();
703 int addPostInvariant();
704 void emitComment(Scope *sc);
705 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
707 StaticDtorDeclaration *isStaticDtorDeclaration() { return this; }
710 struct InvariantDeclaration : FuncDeclaration
712 InvariantDeclaration(Loc loc, Loc endloc);
713 Dsymbol *syntaxCopy(Dsymbol *);
714 void semantic(Scope *sc);
715 int isVirtual();
716 int addPreInvariant();
717 int addPostInvariant();
718 void emitComment(Scope *sc);
719 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
721 InvariantDeclaration *isInvariantDeclaration() { return this; }
725 struct UnitTestDeclaration : FuncDeclaration
727 UnitTestDeclaration(Loc loc, Loc endloc);
728 Dsymbol *syntaxCopy(Dsymbol *);
729 void semantic(Scope *sc);
730 AggregateDeclaration *isThis();
731 int isVirtual();
732 int addPreInvariant();
733 int addPostInvariant();
734 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
736 UnitTestDeclaration *isUnitTestDeclaration() { return this; }
739 struct NewDeclaration : FuncDeclaration
740 { Arguments *arguments;
741 int varargs;
743 NewDeclaration(Loc loc, Loc endloc, Arguments *arguments, int varargs);
744 Dsymbol *syntaxCopy(Dsymbol *);
745 void semantic(Scope *sc);
746 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
747 char *kind();
748 int isVirtual();
749 int addPreInvariant();
750 int addPostInvariant();
752 NewDeclaration *isNewDeclaration() { return this; }
756 struct DeleteDeclaration : FuncDeclaration
757 { Arguments *arguments;
759 DeleteDeclaration(Loc loc, Loc endloc, Arguments *arguments);
760 Dsymbol *syntaxCopy(Dsymbol *);
761 void semantic(Scope *sc);
762 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
763 char *kind();
764 int isDelete();
765 int isVirtual();
766 int addPreInvariant();
767 int addPostInvariant();
768 #ifdef _DH
769 DeleteDeclaration *isDeleteDeclaration() { return this; }
770 #endif
773 #endif /* DMD_DECLARATION_H */