https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122957
>From 9c49e1e558c43d13872afe0a10345e3510afebdf Mon Sep 17 00:00:00 2001 From: Victor Baranov <bar.victor.2...@gmail.com> Date: Tue, 14 Jan 2025 22:30:03 +0300 Subject: [PATCH 1/3] [clang-tidy] Fix: typos in 'AllowedTypes' option in various checks --- .../docs/clang-tidy/checks/performance/for-range-copy.rst | 2 +- .../checks/performance/unnecessary-copy-initialization.rst | 2 +- .../clang-tidy/checks/performance/unnecessary-value-param.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst index 01fde9580e2a08..9460802bf4eab4 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst @@ -32,5 +32,5 @@ Options iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default is empty. If a name in the list contains the sequence `::` it is matched - against the qualified typename (i.e. `namespace::Type`, otherwise it is + against the qualified typename (i.e. `namespace::Type`), otherwise it is matched against only the type name (i.e. `Type`). diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst index 837283811ddcce..4ad9dac3e38f66 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst @@ -45,7 +45,7 @@ Options copying. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default is empty. If a name in the list contains the sequence `::` it is matched - against the qualified typename (i.e. `namespace::Type`, otherwise it is + against the qualified typename (i.e. `namespace::Type`), otherwise it is matched against only the type name (i.e. `Type`). .. option:: ExcludedContainerTypes diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst index cc5e1ae73508c5..330ef960e9a3bb 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst @@ -68,5 +68,5 @@ Options Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default is empty. If a name in the list contains the sequence `::` it is matched against - the qualified typename (i.e. `namespace::Type`, otherwise it is matched + the qualified typename (i.e. `namespace::Type`), otherwise it is matched against only the type name (i.e. `Type`). >From be68e91708bd122e74b03d559796f22a94628155 Mon Sep 17 00:00:00 2001 From: Baranov Victor <bar.victor.2...@gmail.com> Date: Wed, 15 Jan 2025 20:31:44 +0300 Subject: [PATCH 2/3] [clang-tidy] more fixes to docs --- .../docs/clang-tidy/checks/performance/for-range-copy.rst | 6 +++--- .../checks/performance/unnecessary-copy-initialization.rst | 6 +++--- .../checks/performance/unnecessary-value-param.rst | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst index 9460802bf4eab4..cd1b8daacee107 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst @@ -31,6 +31,6 @@ Options A semicolon-separated list of names of types allowed to be copied in each iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default - is empty. If a name in the list contains the sequence `::` it is matched - against the qualified typename (i.e. `namespace::Type`), otherwise it is - matched against only the type name (i.e. `Type`). + is empty. 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``). diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst index 4ad9dac3e38f66..45c91cd56218df 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst @@ -44,9 +44,9 @@ Options A semicolon-separated list of names of types allowed to be initialized by copying. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default - is empty. If a name in the list contains the sequence `::` it is matched - against the qualified typename (i.e. `namespace::Type`), otherwise it is - matched against only the type name (i.e. `Type`). + is empty. 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``). .. option:: ExcludedContainerTypes diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst index 330ef960e9a3bb..6238e7ec5f0004 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst @@ -67,6 +67,6 @@ Options A semicolon-separated list of names of types allowed to be passed by value. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default is - empty. If a name in the list contains the sequence `::` it is matched against - the qualified typename (i.e. `namespace::Type`), otherwise it is matched - against only the type name (i.e. `Type`). + empty. 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``). >From 33baf696c58f0c2cecb273690d6e9b743f619247 Mon Sep 17 00:00:00 2001 From: Victor Baranov <bar.victor.2...@gmail.com> Date: Tue, 28 Jan 2025 13:43:51 +0300 Subject: [PATCH 3/3] [clang-tidy] improved docs --- .../checks/bugprone/assert-side-effect.rst | 10 +++++----- .../checks/performance/for-range-copy.rst | 13 +++++++------ .../performance/unnecessary-copy-initialization.rst | 10 +++++----- .../checks/performance/unnecessary-value-param.rst | 10 +++++----- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/assert-side-effect.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/assert-side-effect.rst index 8ba84ff61c6a94..1355afae92e4fe 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/assert-side-effect.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/assert-side-effect.rst @@ -26,8 +26,8 @@ Options A semicolon-separated list of the names of functions or methods to be considered as not having side-effects. Regular expressions are accepted, - e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, - `Reference` and `reference`. The default is empty. If a name in the list - contains the sequence `::` it is matched against the qualified typename - (i.e. `namespace::Type`, otherwise it is matched against only - the type name (i.e. `Type`). + e.g. ``[Rr]ef(erence)?$`` matches every type with suffix ``Ref``, ``ref``, + ``Reference`` and ``reference``. The default is empty. 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``). diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst index cd1b8daacee107..d7409840294821 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/for-range-copy.rst @@ -23,14 +23,15 @@ Options .. option:: WarnOnAllAutoCopies - When `true`, warns on any use of `auto` as the type of the range-based for + When `true`, warns on any use of ``auto`` as the type of the range-based for loop variable. Default is `false`. .. option:: AllowedTypes A semicolon-separated list of names of types allowed to be copied in each - iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches - every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default - is empty. 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``). + iteration. Regular expressions are accepted, e.g. ``[Rr]ef(erence)?$`` + matches every type with suffix ``Ref``, ``ref``, ``Reference`` and + ``reference``. The default is empty. 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``). diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst index 45c91cd56218df..bb4f42c88d62fe 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-copy-initialization.rst @@ -42,11 +42,11 @@ Options .. option:: AllowedTypes A semicolon-separated list of names of types allowed to be initialized by - copying. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches - every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default - is empty. 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``). + copying. Regular expressions are accepted, e.g. ``[Rr]ef(erence)?$`` matches + every type with suffix ``Ref``, ``ref``, ``Reference`` and ``reference``. + The default is empty. 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``). .. option:: ExcludedContainerTypes diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst index 6238e7ec5f0004..d13c53eea994e7 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/performance/unnecessary-value-param.rst @@ -65,8 +65,8 @@ Options .. option:: AllowedTypes A semicolon-separated list of names of types allowed to be passed by value. - Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type - with suffix `Ref`, `ref`, `Reference` and `reference`. The default is - empty. 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``). + Regular expressions are accepted, e.g. ``[Rr]ef(erence)?$`` matches every + type with suffix ``Ref``, ``ref``, ``Reference`` and ``reference``. The + default is empty. 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``). _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits