[clang-tools-extra] [clang-tidy] Add llvm-regex check (PR #207407)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 3 10:19:31 PDT 2026


https://github.com/zeyi2 commented:

I think the check could be useful in principle, similar to `llvm-formatv-string`. There are also some previous bugs caused by `llvm::Regex` (https://github.com/llvm/llvm-project/issues/48663, https://github.com/llvm/llvm-project/issues/187665 and https://github.com/llvm/llvm-project/pull/194521).

However, I don't think `llvm-regex` follows the usual clang-tidy check naming convention very well. Check names should generally describe the specific rule or problem being diagnosed, not just the API being inspected. WDYT about renaming it to `llvm-invalid-regex-pattern`?

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


More information about the cfe-commits mailing list