@@ -653,10 +686,12 @@ bool HasNameMatcher::matchesNodeFullSlow(const NamedDecl
&Node) const {
for (const StringRef Pattern : Names) {
if (Pattern.starts_with("::")) {
-if (FullName == Pattern)
+if (auto Result = consumePatternBack(Pattern, FullName);
https://github.com/5chmidti requested changes to this pull request.
I think it does make sense to add this wildcard. The motivation to skip regex
sounds like a good one, and it does make sense to special case templates
specifically. The implementation looks correct to me. Just some small things
@@ -638,6 +638,39 @@ bool HasNameMatcher::matchesNodeFullFast(const NamedDecl
&Node) const {
return Patterns.foundMatch(/*AllowFullyQualified=*/true);
}
+static std::optional consumePatternBack(StringRef Pattern,
+ StringRef
@@ -638,6 +638,39 @@ bool HasNameMatcher::matchesNodeFullFast(const NamedDecl
&Node) const {
return Patterns.foundMatch(/*AllowFullyQualified=*/true);
}
+static std::optional consumePatternBack(StringRef Pattern,
+ StringRef
@@ -638,6 +638,39 @@ bool HasNameMatcher::matchesNodeFullFast(const NamedDecl
&Node) const {
return Patterns.foundMatch(/*AllowFullyQualified=*/true);
}
+static std::optional consumePatternBack(StringRef Pattern,
+ StringRef
https://github.com/5chmidti edited
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
@@ -3076,6 +3076,21 @@ inline internal::BindableMatcher sizeOfExpr(
/// \code
/// namespace a { namespace b { class X; } }
/// \endcode
+///
+/// Qualified names in templated classes can be matched explicitly or implicity
+/// by specifying the template type or using `<*>` to
https://github.com/AaronBallman commented:
The changes should also come with a release note in clang/docs/ReleaseNotes.rst.
https://github.com/llvm/llvm-project/pull/100349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/AaronBallman edited
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
https://github.com/njames93 updated
https://github.com/llvm/llvm-project/pull/100349
>From a81c1b2ee0bd0d0622abf1d5ec06846a2e2e3a27 Mon Sep 17 00:00:00 2001
From: Nathan James
Date: Wed, 24 Jul 2024 12:43:39 +0100
Subject: [PATCH] [ASMMatchers] Extend hasName matcher when matching templates
Al
AaronBallman wrote:
> > > @AaronBallman That's a good point, I didn't account for how defaulted
> > > template arguments aren't printed. Would using `<*>` ~or a more rustic
> > > approach of `<_>`~ be a good alternative?
> >
> >
> > I was thinking about that, but I keep coming around to wonde
njames93 wrote:
@AaronBallman That's a good point, I didn't account for how defaulted template
arguments aren't printed.
Would using `<*>` or a more rustic approach of `<_>` be a good alternative?
https://github.com/llvm/llvm-project/pull/100349
___
c
AaronBallman wrote:
> Allow users to match all record instantiations by using <> as a wildcard.
I think this will change the behavior of existing matchers, consider:
```
template
struct S {
Ty Val;
void Call();
};
int main() {
S<> s;
s.Call(); // Currently matches only this
S anothe
https://github.com/AaronBallman edited
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
14 matches
Mail list logo