Skip to content

Commit 49259b1

Browse files
authored
Merge branch 'llvm:main' into feature/space-before-underscore-parens
2 parents e185379 + 3226a5f commit 49259b1

37 files changed

+97
-98
lines changed

clang-tools-extra/clang-tidy/ClangTidy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ ClangTidyASTConsumerFactory::ClangTidyASTConsumerFactory(
356356
if (Context.canExperimentalCustomChecks() && custom::RegisterCustomChecks)
357357
custom::RegisterCustomChecks(Context.getOptions(), *CheckFactories);
358358
#endif
359-
for (ClangTidyModuleRegistry::entry const E :
359+
for (const ClangTidyModuleRegistry::entry E :
360360
ClangTidyModuleRegistry::entries()) {
361361
std::unique_ptr<ClangTidyModule> Module = E.instantiate();
362362
Module->addCheckFactories(*CheckFactories);

clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ void QualifiedAutoCheck::registerMatchers(MatchFinder *Finder) {
146146
return qualType(anyOf(qualType(pointerType(pointee(InnerMatchers...))),
147147
qualType(substTemplateTypeParmType(hasReplacementType(
148148
pointerType(pointee(InnerMatchers...)))))));
149-
150149
};
151150

152151
auto IsAutoDeducedToPointer =

clang-tools-extra/docs/clang-tidy/checks/boost/use-ranges.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ If calls are made using reverse iterators on containers, The code will be
146146
fixed using the ``boost::adaptors::reverse`` adaptor.
147147

148148
.. code-block:: c++
149-
149+
150150
auto AreSame = std::equal(Items1.rbegin(), Items1.rend(),
151151
std::crbegin(Items2), std::crend(Items2));
152152

@@ -166,7 +166,7 @@ Options
166166
is `llvm`.
167167

168168
.. option:: IncludeBoostSystem
169-
169+
170170
If `true` (default value) the boost headers are included as system headers
171171
with angle brackets (`#include <boost.hpp>`), otherwise quotes are used
172172
(`#include "boost.hpp"`).

clang-tools-extra/docs/clang-tidy/checks/bugprone/assignment-in-if-condition.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Such assignments are bug-prone because they may have been intended as equality t
88

99
This check finds all assignments within `if` conditions, including ones that are not flagged
1010
by `-Wparentheses` due to an extra set of parentheses, and including assignments that call
11-
an overloaded `operator=()`. The identified assignments violate
11+
an overloaded `operator=()`. The identified assignments violate
1212
`BARR group "Rule 8.2.c" <https://barrgroup.com/embedded-systems/books/embedded-c-coding-standard/statement-rules/if-else-statements>`_.
1313

1414
.. code-block:: c++

clang-tools-extra/docs/clang-tidy/checks/bugprone/capturing-this-in-member-variable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Possible fixes:
3030
- marking copy and move constructors and assignment operators deleted.
3131
- using class member method instead of class member variable with function
3232
object types.
33-
- passing ``this`` pointer as parameter
33+
- passing ``this`` pointer as parameter.
3434

3535
Options
3636
-------

clang-tools-extra/docs/clang-tidy/checks/bugprone/crtp-constructor-accessibility.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ bugprone-crtp-constructor-accessibility
66
Detects error-prone Curiously Recurring Template Pattern usage, when the CRTP
77
can be constructed outside itself and the derived class.
88

9-
The CRTP is an idiom, in which a class derives from a template class, where
9+
The CRTP is an idiom, in which a class derives from a template class, where
1010
itself is the template argument. It should be ensured that if a class is
1111
intended to be a base class in this idiom, it can only be instantiated if
1212
the derived class is its template argument.
@@ -23,7 +23,7 @@ Example:
2323

2424
class Derived : CRTP<Derived> {};
2525

26-
Below can be seen some common mistakes that will allow the breaking of the
26+
Below can be seen some common mistakes that will allow the breaking of the
2727
idiom.
2828

2929
If the constructor of a class intended to be used in a CRTP is public, then
@@ -62,7 +62,7 @@ Example:
6262
class Bad : CRTP<Good> {};
6363
Bad BadInstance;
6464

65-
To ensure that no accidental instantiation happens, the best practice is to
65+
To ensure that no accidental instantiation happens, the best practice is to
6666
make the constructor private and declare the derived class as friend. Note
6767
that as a tradeoff, this also gives the derived class access to every other
6868
private members of the CRTP. However, constructors can still be public or

clang-tools-extra/docs/clang-tidy/checks/bugprone/derived-method-shadowing-base-method.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Finds derived class methods that shadow a (non-virtual) base class method.
77

88
In order to be considered "shadowing", methods must have the same signature
99
(i.e. the same name, same number of parameters, same parameter types, etc).
10-
Only checks public, non-templated methods.
10+
Only checks public, non-templated methods.
1111

1212
The below example is bugprone because consumers of the ``Derived`` class will
1313
expect the ``reset`` method to do the work of ``Base::reset()`` in addition to extra
@@ -27,4 +27,4 @@ This is also a violation of the Liskov Substitution Principle.
2727
2828
struct Derived : public Base {
2929
void reset() {/* reset the derived class, but not the base class */};
30-
};
30+
};

clang-tools-extra/docs/clang-tidy/checks/bugprone/incorrect-enable-shared-from-this.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
bugprone-incorrect-enable-shared-from-this
44
==========================================
55

6-
Detect classes or structs that do not publicly inherit from
7-
``std::enable_shared_from_this``, because unintended behavior will
6+
Detect classes or structs that do not publicly inherit from
7+
``std::enable_shared_from_this``, because unintended behavior will
88
otherwise occur when calling ``shared_from_this``.
99

1010
Consider the following code:
@@ -15,7 +15,7 @@ Consider the following code:
1515

1616
// private inheritance
1717
class BadExample : std::enable_shared_from_this<BadExample> {
18-
18+
1919
// ``shared_from_this``` unintended behaviour
2020
// `libstdc++` implementation returns uninitialized ``weak_ptr``
2121
public:
@@ -29,6 +29,6 @@ Consider the following code:
2929
b_ex->bar();
3030
}
3131

32-
Using `libstdc++` implementation, ``shared_from_this`` will throw
33-
``std::bad_weak_ptr``. When ``using_not_public()`` is called, this code will
32+
Using `libstdc++` implementation, ``shared_from_this`` will throw
33+
``std::bad_weak_ptr``. When ``using_not_public()`` is called, this code will
3434
crash without exception handling.

clang-tools-extra/docs/clang-tidy/checks/bugprone/pointer-arithmetic-on-polymorphic-object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Options
5454
Default: `false`.
5555

5656
.. code-block:: c++
57-
57+
5858
void bar(Base b[], Derived d[]) {
5959
b += 1; // warning, as Base declares a virtual destructor
6060
d += 1; // warning only if IgnoreVirtualDeclarationsOnly is set to false

clang-tools-extra/docs/clang-tidy/checks/bugprone/raw-memory-call-on-non-trivial-type.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Options
1616

1717
.. option:: MemSetNames
1818

19-
Specify extra functions to flag that act similarly to ``memset``. Specify
19+
Specify extra functions to flag that act similarly to ``memset``. Specify
2020
names in a semicolon-delimited list. Default is an empty string.
2121

2222
.. option:: MemCpyNames
2323

24-
Specify extra functions to flag that act similarly to ``memcpy``. Specify
24+
Specify extra functions to flag that act similarly to ``memcpy``. Specify
2525
names in a semicolon-delimited list. Default is an empty string.
2626

2727
.. option:: MemCmpNames
2828

29-
Specify extra functions to flag that act similarly to ``memcmp``. Specify
29+
Specify extra functions to flag that act similarly to ``memcmp``. Specify
3030
names in a semicolon-delimited list. Default is an empty string.
3131

3232
This check corresponds to the CERT C++ Coding Standard rule

0 commit comments

Comments
 (0)