ID: Add AddAttr() helper

This is just a follow-up as code cleanup, but not required
to be backported to 5.1.
This commit is contained in:
Arne Welzel 2022-12-02 17:57:07 +01:00
parent ef920ef3f5
commit da5fdb2072
5 changed files with 13 additions and 17 deletions

View file

@ -883,9 +883,7 @@ function_ingredients::function_ingredients(ScopePtr scope, StmtPtr body,
if ( a->Tag() == ATTR_IS_USED )
{
// Associate this with the identifier, too.
std::vector<AttrPtr> used_attr;
used_attr.emplace_back(make_intrusive<Attr>(ATTR_IS_USED));
id->AddAttrs(make_intrusive<Attributes>(used_attr, nullptr, false, true));
id->AddAttr(make_intrusive<Attr>(ATTR_IS_USED));
break;
}
}