mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Improve use of &deprecated on functions.
- Don't report warnings on function definition if declaration is marked deprecated. - Allow &deprecated to apply to a standalone function definition.
This commit is contained in:
parent
87962a48dd
commit
011e2cdd32
7 changed files with 53 additions and 6 deletions
|
@ -435,6 +435,10 @@ void end_func(Stmt* body, attr_list* attrs)
|
|||
loop_over_list(*attrs, i)
|
||||
{
|
||||
Attr* a = (*attrs)[i];
|
||||
|
||||
if ( a->Tag() == ATTR_DEPRECATED )
|
||||
continue;
|
||||
|
||||
if ( a->Tag() != ATTR_PRIORITY )
|
||||
{
|
||||
a->Error("illegal attribute for function body");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue