MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CheckForUnknowns

Method CheckForUnknowns

eval/eval/attribute_utility.cc:153–164  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

151// (if initial_set is not null).
152// Returns pointer to merged set or nullptr, if there were no sets to merge.
153AttributeSet 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

Callers 1

TEST_FFunction · 0.80

Calls 2

attributeMethod · 0.80
AddMethod · 0.45

Tested by 1

TEST_FFunction · 0.64