Skip to content

Commit 00e80fb

Browse files
authored
[NFC] Correct C++ standard names (llvm#81421)
1 parent b45de48 commit 00e80fb

File tree

17 files changed

+24
-24
lines changed

17 files changed

+24
-24
lines changed

clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(
158158
{"wctype.h", "cwctype"}})) {
159159
CStyledHeaderToCxx.insert(KeyValue);
160160
}
161-
// Add C++ 11 headers.
161+
// Add C++11 headers.
162162
if (LangOpts.CPlusPlus11) {
163163
for (const auto &KeyValue :
164164
std::vector<std::pair<llvm::StringRef, std::string>>(

clang-tools-extra/docs/clang-tidy/checks/modernize/deprecated-headers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ modernize-deprecated-headers
44
============================
55

66
Some headers from C library were deprecated in C++ and are no longer welcome in
7-
C++ codebases. Some have no effect in C++. For more details refer to the C++ 14
7+
C++ codebases. Some have no effect in C++. For more details refer to the C++14
88
Standard [depr.c.headers] section.
99

1010
This check replaces C standard library headers with their C++ alternatives and

clang-tools-extra/docs/clang-tidy/checks/modernize/use-override.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ removes ``virtual`` from those functions as it is not required.
1010
user that a function was virtual. C++ compilers did not use the presence of
1111
this to signify an overridden function.
1212

13-
In C++ 11 ``override`` and ``final`` keywords were introduced to allow
13+
In C++11 ``override`` and ``final`` keywords were introduced to allow
1414
overridden functions to be marked appropriately. Their presence allows
1515
compilers to verify that an overridden function correctly overrides a base
1616
class implementation.

clang-tools-extra/docs/clang-tidy/checks/readability/container-contains.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
readability-container-contains
44
==============================
55

6-
Finds usages of ``container.count()`` and ``container.find() == container.end()`` which should be replaced by a call to the ``container.contains()`` method introduced in C++ 20.
6+
Finds usages of ``container.count()`` and ``container.find() == container.end()`` which should be replaced by a call to the ``container.contains()`` method introduced in C++20.
77

88
Whether an element is contained inside a container should be checked with ``contains`` instead of ``count``/``find`` because ``contains`` conveys the intent more clearly. Furthermore, for containers which permit multiple entries per key (``multimap``, ``multiset``, ...), ``contains`` is more efficient than ``count`` because ``count`` has to do unnecessary additional work.
99

clang-tools-extra/docs/clang-tidy/checks/readability/use-anyofallof.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ readability-use-anyofallof
44
==========================
55

66
Finds range-based for loops that can be replaced by a call to ``std::any_of`` or
7-
``std::all_of``. In C++ 20 mode, suggests ``std::ranges::any_of`` or
7+
``std::all_of``. In C++20 mode, suggests ``std::ranges::any_of`` or
88
``std::ranges::all_of``.
99

1010
Example:

clang/include/clang/Basic/Module.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class alignas(8) Module {
118118
/// of header files.
119119
ModuleMapModule,
120120

121-
/// This is a C++ 20 header unit.
121+
/// This is a C++20 header unit.
122122
ModuleHeaderUnit,
123123

124124
/// This is a C++20 module interface unit.
@@ -127,10 +127,10 @@ class alignas(8) Module {
127127
/// This is a C++20 module implementation unit.
128128
ModuleImplementationUnit,
129129

130-
/// This is a C++ 20 module partition interface.
130+
/// This is a C++20 module partition interface.
131131
ModulePartitionInterface,
132132

133-
/// This is a C++ 20 module partition implementation.
133+
/// This is a C++20 module partition implementation.
134134
ModulePartitionImplementation,
135135

136136
/// This is the explicit Global Module Fragment of a modular TU.

clang/lib/Basic/Module.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ Module *Module::findOrInferSubmodule(StringRef Name) {
376376

377377
Module *Module::getGlobalModuleFragment() const {
378378
assert(isNamedModuleUnit() && "We should only query the global module "
379-
"fragment from the C++ 20 Named modules");
379+
"fragment from the C++20 Named modules");
380380

381381
for (auto *SubModule : SubModules)
382382
if (SubModule->isExplicitGlobalModule())
@@ -387,7 +387,7 @@ Module *Module::getGlobalModuleFragment() const {
387387

388388
Module *Module::getPrivateModuleFragment() const {
389389
assert(isNamedModuleUnit() && "We should only query the private module "
390-
"fragment from the C++ 20 Named modules");
390+
"fragment from the C++20 Named modules");
391391

392392
for (auto *SubModule : SubModules)
393393
if (SubModule->isPrivateModule())

clang/lib/Headers/stdatomic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Exclude the MSVC path as well as the MSVC header as of the 14.31.30818
1717
* explicitly disallows `stdatomic.h` in the C mode via an `#error`. Fallback
1818
* to the clang resource header until that is fully supported. The
19-
* `stdatomic.h` header requires C++ 23 or newer.
19+
* `stdatomic.h` header requires C++23 or newer.
2020
*/
2121
#if __STDC_HOSTED__ && \
2222
__has_include_next(<stdatomic.h>) && \

clang/lib/Lex/DependencyDirectivesScanner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static void skipBlockComment(const char *&First, const char *const End) {
369369
}
370370
}
371371

372-
/// \returns True if the current single quotation mark character is a C++ 14
372+
/// \returns True if the current single quotation mark character is a C++14
373373
/// digit separator.
374374
static bool isQuoteCppDigitSeparator(const char *const Start,
375375
const char *const Cur,

clang/test/Analysis/bitwise-shift-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int expression_tracked_back(void) {
154154
//===----------------------------------------------------------------------===//
155155

156156
int allow_overflows_and_negative_operands(void) {
157-
// These are all legal under C++ 20 and many compilers accept them under
157+
// These are all legal under C++20 and many compilers accept them under
158158
// earlier standards as well.
159159
int int_min = 1 << 31; // no-warning
160160
int this_overflows = 1027 << 30; // no-warning

0 commit comments

Comments
 (0)