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
10
src/ID.cc
10
src/ID.cc
|
@ -248,6 +248,16 @@ void ID::UpdateValAttrs()
|
|||
}
|
||||
}
|
||||
|
||||
void ID::MakeDeprecated()
|
||||
{
|
||||
if ( IsDeprecated() )
|
||||
return;
|
||||
|
||||
attr_list* attr = new attr_list;
|
||||
attr->append(new Attr(ATTR_DEPRECATED));
|
||||
AddAttrs(new Attributes(attr, Type(), false));
|
||||
}
|
||||
|
||||
void ID::AddAttrs(Attributes* a)
|
||||
{
|
||||
if ( attrs )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue