GH-157: Mark some attributes as not allowed for global variables

This commit is contained in:
Tim Wojtulewicz 2019-07-08 14:31:51 -07:00
parent a2c7ed5ff6
commit ec4913ac18
8 changed files with 41 additions and 17 deletions

View file

@ -650,7 +650,7 @@ void FuncType::DescribeReST(ODesc* d, bool roles_only) const
TypeDecl::TypeDecl(BroType* t, const char* i, attr_list* arg_attrs, bool in_record)
{
type = t;
attrs = arg_attrs ? new Attributes(arg_attrs, t, in_record) : 0;
attrs = arg_attrs ? new Attributes(arg_attrs, t, in_record, false) : 0;
id = i;
}
@ -841,7 +841,7 @@ const char* RecordType::AddFields(type_decl_list* others, attr_list* attr)
if ( log )
{
if ( ! td->attrs )
td->attrs = new Attributes(new attr_list, td->type, true);
td->attrs = new Attributes(new attr_list, td->type, true, false);
td->attrs->AddAttr(new Attr(ATTR_LOG));
}