[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 15 09:24:48 PST 2025


================
@@ -196,3 +196,13 @@ Options
     // The following pointer may not become a 'int *const'.
     int *changing_pointee = &value;
     changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
+
+  A semicolon-separated list of names of types that
+  will be excluded from const-correctness checking.
+  Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type
+  with suffix `Ref`, `ref`, `Reference` and `reference`.
+  If a name in the list contains the sequence `::`, it is matched against
+  the qualified type name (i.e. `namespace::Type`), otherwise it is matched
+  against only the type name (i.e. `Type`).
----------------
vbvictor wrote:

Done

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


More information about the cfe-commits mailing list