@@ -1573,7 +1573,7 @@ Type *stripDefaultArgs(Type *t)
15731573 {
15741574 Parameter * p = (* params )[i ];
15751575 Type * ta = stripDefaultArgs (p -> type );
1576- if (ta != p -> type || p -> defaultArg || p -> ident )
1576+ if (ta != p -> type || p -> defaultArg || p -> ident || p -> userAttribDecl )
15771577 {
15781578 if (params == parameters )
15791579 {
@@ -1583,7 +1583,7 @@ Type *stripDefaultArgs(Type *t)
15831583 (* params )[j ] = (* parameters )[j ];
15841584 }
15851585 StorageClass stc = p -> storageClass & (~STCauto ); // issue 14656
1586- (* params )[i ] = new Parameter (stc , ta , NULL , NULL );
1586+ (* params )[i ] = new Parameter (stc , ta , NULL , NULL , NULL );
15871587 }
15881588 }
15891589 }
@@ -2037,7 +2037,7 @@ Type *TypeFunction::substWildTo(unsigned)
20372037 continue ;
20382038 if (params == parameters )
20392039 params = parameters -> copy ();
2040- (* params )[i ] = new Parameter (p -> storageClass , t , NULL , NULL );
2040+ (* params )[i ] = new Parameter (p -> storageClass , t , NULL , NULL , NULL );
20412041 }
20422042 if (next == tret && params == parameters )
20432043 return this ;
@@ -3706,7 +3706,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident, int f
37063706 Parameters * params = new Parameters ;
37073707 Type * next = n -> ty == Twchar ? Type ::twchar : Type ::tchar ;
37083708 Type * arrty = next -> arrayOf ();
3709- params -> push (new Parameter (0 , arrty , NULL , NULL ));
3709+ params -> push (new Parameter (0 , arrty , NULL , NULL , NULL ));
37103710 reverseFd [i ] = FuncDeclaration ::genCfunc (params , arrty , reverseName [i ]);
37113711 }
37123712
@@ -3729,7 +3729,7 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident, int f
37293729 Parameters * params = new Parameters ;
37303730 Type * next = n -> ty == Twchar ? Type ::twchar : Type ::tchar ;
37313731 Type * arrty = next -> arrayOf ();
3732- params -> push (new Parameter (0 , arrty , NULL , NULL ));
3732+ params -> push (new Parameter (0 , arrty , NULL , NULL , NULL ));
37333733 sortFd [i ] = FuncDeclaration ::genCfunc (params , arrty , sortName [i ]);
37343734 }
37353735
@@ -3754,8 +3754,8 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident, int f
37543754 if (!adReverse_fd )
37553755 {
37563756 Parameters * params = new Parameters ;
3757- params -> push (new Parameter (0 , Type ::tvoid -> arrayOf (), NULL , NULL ));
3758- params -> push (new Parameter (0 , Type ::tsize_t , NULL , NULL ));
3757+ params -> push (new Parameter (0 , Type ::tvoid -> arrayOf (), NULL , NULL , NULL ));
3758+ params -> push (new Parameter (0 , Type ::tsize_t , NULL , NULL , NULL ));
37593759 adReverse_fd = FuncDeclaration ::genCfunc (params , Type ::tvoid -> arrayOf (), Id ::adReverse );
37603760 }
37613761 fd = adReverse_fd ;
@@ -3778,8 +3778,8 @@ Expression *TypeArray::dotExp(Scope *sc, Expression *e, Identifier *ident, int f
37783778 if (!fd )
37793779 {
37803780 Parameters * params = new Parameters ;
3781- params -> push (new Parameter (0 , Type ::tvoid -> arrayOf (), NULL , NULL ));
3782- params -> push (new Parameter (0 , Type ::dtypeinfo -> type , NULL , NULL ));
3781+ params -> push (new Parameter (0 , Type ::tvoid -> arrayOf (), NULL , NULL , NULL ));
3782+ params -> push (new Parameter (0 , Type ::dtypeinfo -> type , NULL , NULL , NULL ));
37833783 fd = FuncDeclaration ::genCfunc (params , Type ::tvoid -> arrayOf (), "_adSort" );
37843784 }
37853785 ec = new VarExp (Loc (), fd );
@@ -4785,7 +4785,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident, int
47854785 if (fd_aaLen == NULL )
47864786 {
47874787 Parameters * fparams = new Parameters ();
4788- fparams -> push (new Parameter (STCin , this , NULL , NULL ));
4788+ fparams -> push (new Parameter (STCin , this , NULL , NULL , NULL ));
47894789 fd_aaLen = FuncDeclaration ::genCfunc (fparams , Type ::tsize_t , Id ::aaLen );
47904790 TypeFunction * tf = (TypeFunction * )fd_aaLen -> type ;
47914791 tf -> purity = PUREconst ;
@@ -5607,7 +5607,7 @@ Type *TypeFunction::semantic(Loc loc, Scope *sc)
56075607 {
56085608 Parameter * narg = (* tt -> arguments )[j ];
56095609 (* newparams )[j ] = new Parameter (narg -> storageClass | fparam -> storageClass ,
5610- narg -> type , narg -> ident , narg -> defaultArg );
5610+ narg -> type , narg -> ident , narg -> defaultArg , narg -> userAttribDecl );
56115611 }
56125612 fparam -> type = new TypeTuple (newparams );
56135613 }
@@ -8684,7 +8684,7 @@ TypeTuple::TypeTuple(Expressions *exps)
86848684 { Expression * e = (* exps )[i ];
86858685 if (e -> type -> ty == Ttuple )
86868686 e -> error ("cannot form tuple of tuples" );
8687- Parameter * arg = new Parameter (STCundefined , e -> type , NULL , NULL );
8687+ Parameter * arg = new Parameter (STCundefined , e -> type , NULL , NULL , NULL );
86888688 (* arguments )[i ] = arg ;
86898689 }
86908690 }
@@ -8710,15 +8710,15 @@ TypeTuple::TypeTuple(Type *t1)
87108710 : Type (Ttuple )
87118711{
87128712 arguments = new Parameters ();
8713- arguments -> push (new Parameter (0 , t1 , NULL , NULL ));
8713+ arguments -> push (new Parameter (0 , t1 , NULL , NULL , NULL ));
87148714}
87158715
87168716TypeTuple ::TypeTuple (Type * t1 , Type * t2 )
87178717 : Type (Ttuple )
87188718{
87198719 arguments = new Parameters ();
8720- arguments -> push (new Parameter (0 , t1 , NULL , NULL ));
8721- arguments -> push (new Parameter (0 , t2 , NULL , NULL ));
8720+ arguments -> push (new Parameter (0 , t1 , NULL , NULL , NULL ));
8721+ arguments -> push (new Parameter (0 , t2 , NULL , NULL , NULL ));
87228722}
87238723
87248724const char * TypeTuple ::kind ()
@@ -9015,25 +9015,27 @@ Expression *TypeNull::defaultInit(Loc loc) { return new NullExp(Loc(), Type::tnu
90159015
90169016/***************************** Parameter *****************************/
90179017
9018- Parameter ::Parameter (StorageClass storageClass , Type * type , Identifier * ident , Expression * defaultArg )
9018+ Parameter ::Parameter (StorageClass storageClass , Type * type , Identifier * ident , Expression * defaultArg , UserAttributeDeclaration * userAttribDecl )
90199019{
90209020 this -> type = type ;
90219021 this -> ident = ident ;
90229022 this -> storageClass = storageClass ;
90239023 this -> defaultArg = defaultArg ;
9024+ this -> userAttribDecl = userAttribDecl ;
90249025}
90259026
9026- Parameter * Parameter ::create (StorageClass storageClass , Type * type , Identifier * ident , Expression * defaultArg )
9027+ Parameter * Parameter ::create (StorageClass storageClass , Type * type , Identifier * ident , Expression * defaultArg , UserAttributeDeclaration * userAttribDecl )
90279028{
9028- return new Parameter (storageClass , type , ident , defaultArg );
9029+ return new Parameter (storageClass , type , ident , defaultArg , userAttribDecl );
90299030}
90309031
90319032Parameter * Parameter ::syntaxCopy ()
90329033{
90339034 return new Parameter (storageClass ,
90349035 type ? type -> syntaxCopy () : NULL ,
90359036 ident ,
9036- defaultArg ? defaultArg -> syntaxCopy () : NULL );
9037+ defaultArg ? defaultArg -> syntaxCopy () : NULL ,
9038+ userAttribDecl ? (UserAttributeDeclaration * )userAttribDecl -> syntaxCopy (NULL ) : NULL );
90379039}
90389040
90399041Parameters * Parameter ::arraySyntaxCopy (Parameters * parameters )
0 commit comments