Add is_used attribute to an ID if used in a signature eval statement

This commit is contained in:
Tim Wojtulewicz 2022-08-31 10:00:30 -07:00
parent a726418d38
commit 0a0dd7143b
4 changed files with 37 additions and 0 deletions

View file

@ -180,6 +180,10 @@ RuleConditionEval::RuleConditionEval(const char* func)
rules_error("eval function parameters must be a 'signature_state' "
"and a 'string' type",
func);
std::vector<AttrPtr> attrv{make_intrusive<Attr>(ATTR_IS_USED, nullptr)};
id->AddAttrs(
make_intrusive<Attributes>(std::move(attrv), id->GetType(), false, id->IsGlobal()));
}
}