Creates merged UnknownAttributeSet. Scans over the args collection, determines if there matches to unknown patterns, merges attributes together with those from initial_set (if initial_set is not null). Returns pointer to merged set or nullptr, if there were no sets to merge.
| 151 | // (if initial_set is not null). |
| 152 | // Returns pointer to merged set or nullptr, if there were no sets to merge. |
| 153 | AttributeSet AttributeUtility::CheckForUnknowns( |
| 154 | absl::Span<const AttributeTrail> args, bool use_partial) const { |
| 155 | AttributeSet attribute_set; |
| 156 | |
| 157 | for (const auto& trail : args) { |
| 158 | if (CheckForUnknown(trail, use_partial)) { |
| 159 | attribute_set.Add(trail.attribute()); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | return attribute_set; |
| 164 | } |
| 165 | |
| 166 | // Creates merged UnknownAttributeSet. |
| 167 | // Merges together attributes from UnknownAttributeSets found in the args |