[clang-tools-extra] [clang-tidy] Add llvm-regex check (PR #207407)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 05:18:03 PDT 2026
================
@@ -0,0 +1,36 @@
+.. title:: clang-tidy - llvm-invalid-regex-pattern
+
+llvm-invalid-regex-pattern
+==========================
+
+Detects malformed regex patterns defined in a single string literal
+to catch mistakes at compile time.
+It detects these string literals if they are defined in the regex constructor
+with a string literal, or stored in one of these non mutable container:
+
+- ``const std::string``
+- ``const char*``
+- ``const llvm::StringRef``
+- ``std::string_view``
----------------
furtib wrote:
I have added char arrays to the list of checked items.
Do you think that is overly broad?
https://github.com/llvm/llvm-project/pull/207407
More information about the cfe-commits
mailing list