llvm-project
ab903b4f - [ADT] Add predicate based match support to StringSwitch (#188046)

Commit
28 days ago
[ADT] Add predicate based match support to StringSwitch (#188046) This introduces `Predicate` and `IfNotPredicate` case selection to StringSwitch to allow use cases like ``` StringSwitch<...>(..) .Case("foo", FooTok) .Predicate([](StringRef Str){ ... }, IdentifierTok) ... ``` This is mostly useful for improving conciseness and clarity when processing generated strings, diagnostics, and similar.
Author
Parents
Loading