Merge remote-tracking branch 'origin/topic/timw/174-duplicate-attributes'

- Replaced "tag" with "attribute" in the error message since the former
  is not exactly the same concept/meaning and also not user-facing
  terminology

* origin/topic/timw/174-duplicate-attributes:
  Allow duplicate attributes in full redefs
  Short-circuit checking of whether attr exists
  Expanded check for other tag types, fixed btest to cover more tags
  GH-174: Add warning for duplicate attributes
This commit is contained in:
Jon Siwek 2020-08-31 17:31:21 -07:00
commit 5e6bb843ab
10 changed files with 65 additions and 18 deletions

View file

@ -115,12 +115,12 @@ public:
~Attributes() override = default;
void AddAttr(AttrPtr a);
void AddAttr(AttrPtr a, bool is_redef = false);
void AddAttrs(const AttributesPtr& a);
void AddAttrs(const AttributesPtr& a, bool is_redef = false);
[[deprecated("Remove in v4.1. Pass IntrusivePtr instead.")]]
void AddAttrs(Attributes* a); // Unref's 'a' when done
void AddAttrs(Attributes* a, bool is_redef = false); // Unref's 'a' when done
[[deprecated("Remove in v4.1. Use Find().")]]
Attr* FindAttr(AttrTag t) const;