Previously, if all the parts of the CallDescription were matched, we
accepted the Call.
On the other hand, it would make sense to check if the Call has any
unmatched qualified name parts, that are not inline or anonymous
namespaces.
Consequently, now we reject the Call: my::std::container::data() when
matching against CallDescription: { "std", "container", "data" }.
To get all the tests to work, I needed to introduce wildcard matching.
The wildcard is the "?" string literal.
Using wildcards, now it's possible to match llvm::MyClass::getAs() by
the { "llvm", "?", "getAs" } CallDescription.
Check the related unittest for more examples.
About the semantics of the 'wildcard':
The qualified name parts are matched as usual:
If we mismatch, and the current part was an inline/anonymous namespace,
we skip this and continue by trying to match the rest of the segments.
Else, if we mismatched AND we are not trying to match against a wildcard,
we reject.
Otherwise, we either matched OR consumed a wildcard, so advance to the
next segment.
So, a wildcard can only match against a single name part. They will
match greedily except when it's an inline/anonymous namespace, which
won't consume the wildcard.
This documentation is not the most easy to understand, probably because meaning of "skip" in this and next context seems to be different. Better: like inline namespaces are ignored, and the "*" matches one non-inline namespace (if this is correct).
Here {"X", "X", "f"} will match or not? And {"X", "*", "f"}, and {"X", "f"}?