[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 06:27:49 PDT 2024


================
@@ -125,6 +125,7 @@ RegistryMaps::RegistryMaps() {
   REGISTER_MATCHER_OVERLOAD(equals);
 
   REGISTER_REGEX_MATCHER(isExpansionInFileMatching);
+  REGISTER_REGEX_MATCHER(matchesString);
   REGISTER_REGEX_MATCHER(matchesName);
   REGISTER_REGEX_MATCHER(matchesSelector);
----------------
AaronBallman wrote:

```suggestion
  REGISTER_REGEX_MATCHER(matchesName);
  REGISTER_REGEX_MATCHER(matchesSelector);
  REGISTER_REGEX_MATCHER(matchesString);
```
We try to keep these in alphabetical order.

https://github.com/llvm/llvm-project/pull/102152


More information about the cfe-commits mailing list