[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
Tue Jan 14 21:45:16 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 typename (i.e. `namespace::Type`), otherwise it is matched
----------------
vbvictor wrote:
I must note that files `for-range-copy.rst`, `unnecessary-copy-initialization.rst`, `unnecessary-value-param.rst` have the same errors in description of AllowedTypes option.
Should I also make these corrections in https://github.com/llvm/llvm-project/pull/122957?
https://github.com/llvm/llvm-project/pull/122951
More information about the cfe-commits
mailing list