mirror of
https://github.com/golang/go.git
synced 2025-05-30 11:51:34 +00:00
catch export on func.
print names in message. R=ken OCL=22891 CL=22891
This commit is contained in:
parent
33f3ed7710
commit
605d0746c5
@ -73,12 +73,14 @@ autoexport(Sym *s)
|
|||||||
return;
|
return;
|
||||||
if(exportname(s->name)) {
|
if(exportname(s->name)) {
|
||||||
if(dcladj != exportsym)
|
if(dcladj != exportsym)
|
||||||
warn("uppercase missing export");
|
warn("uppercase missing export: %S", s);
|
||||||
exportsym(s);
|
exportsym(s);
|
||||||
} else {
|
} else {
|
||||||
if(dcladj == exportsym)
|
if(dcladj == exportsym) {
|
||||||
warn("export missing uppercase");
|
warn("export missing uppercase: %S", s);
|
||||||
packagesym(s);
|
exportsym(s);
|
||||||
|
} else
|
||||||
|
packagesym(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,6 +186,8 @@ xdcl:
|
|||||||
}
|
}
|
||||||
| xfndcl
|
| xfndcl
|
||||||
{
|
{
|
||||||
|
if($1 != N && $1->nname != N && $1->type->thistuple == 0)
|
||||||
|
autoexport($1->nname->sym);
|
||||||
$$ = N;
|
$$ = N;
|
||||||
}
|
}
|
||||||
| LEXPORT { dcladj = exportsym; stksize = initstksize; } common_dcl
|
| LEXPORT { dcladj = exportsym; stksize = initstksize; } common_dcl
|
||||||
@ -205,8 +207,11 @@ xdcl:
|
|||||||
}
|
}
|
||||||
| LEXPORT xfndcl
|
| LEXPORT xfndcl
|
||||||
{
|
{
|
||||||
if($2 != N && $2->nname != N)
|
if($2 != N && $2->nname != N) {
|
||||||
exportsym($2->nname->sym);
|
dcladj = exportsym;
|
||||||
|
autoexport($2->nname->sym);
|
||||||
|
dcladj = nil;
|
||||||
|
}
|
||||||
$$ = N;
|
$$ = N;
|
||||||
}
|
}
|
||||||
| LPACKAGE { warn("package is gone"); } xfndcl
|
| LPACKAGE { warn("package is gone"); } xfndcl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user