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:
Jon Siwek 2015-01-21 12:27:09 -06:00
parent 87962a48dd
commit 011e2cdd32
7 changed files with 53 additions and 6 deletions

View file

@ -1479,11 +1479,7 @@ void EnumType::CheckAndAddName(const string& module_name, const char* name,
id->SetEnumConst();
if ( deprecated )
{
attr_list* attr = new attr_list;
attr->append(new Attr(ATTR_DEPRECATED));
id->AddAttrs(new Attributes(attr, id->Type(), false));
}
id->MakeDeprecated();
broxygen_mgr->Identifier(id);
}