================ @@ -638,6 +638,39 @@ bool HasNameMatcher::matchesNodeFullFast(const NamedDecl &Node) const { return Patterns.foundMatch(/*AllowFullyQualified=*/true); } +static std::optional<StringRef> consumePatternBack(StringRef Pattern, + StringRef Target) { + while (!Pattern.empty()) { + auto Index = Pattern.rfind("<*>"); + if (Index == StringRef::npos) { + if (Target.consume_back(Pattern)) + return Target; + return {}; + } + auto Suffix = Pattern.substr(Index + 2); + if (!Target.consume_back(Suffix)) + return {}; + auto BracketCount = 1; ---------------- 5chmidti wrote:
You're using `auto` three times here without the type mentioned on the RHS (not sure how strict `clang/` is w.r.t. this) `Suffix` and `Index` can be `const` https://github.com/llvm/llvm-project/pull/100349 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits