[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
Fri Jan 31 13:49:29 PST 2025
================
@@ -196,3 +199,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes
+
+ 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``).
+ Default is empty.
----------------
vbvictor wrote:
Done.
https://github.com/llvm/llvm-project/pull/122951
More information about the cfe-commits
mailing list