Skip to content

Commit 00e80fb

Browse files
authored
[NFC] Correct C++ standard names (#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

clang/unittests/Analysis/FlowSensitive/TransferTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2093,7 +2093,7 @@ TEST(TransferTest, TemporaryObject) {
20932093

20942094
TEST(TransferTest, ElidableConstructor) {
20952095
// This test is effectively the same as TransferTest.TemporaryObject, but
2096-
// the code is compiled as C++ 14.
2096+
// the code is compiled as C++14.
20972097
std::string Code = R"(
20982098
struct A {
20992099
int Bar;

clang/unittests/Lex/DependencyDirectivesScannerTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ TEST(MinimizeSourceToDependencyDirectivesTest, UnderscorePragma) {
583583
R"(_Pragma(u"clang module import"))", Out));
584584
EXPECT_STREQ("<TokBeforeEOF>\n", Out.data());
585585

586-
// FIXME: R"()" strings depend on using C++ 11 language mode
586+
// FIXME: R"()" strings depend on using C++11 language mode
587587
ASSERT_FALSE(minimizeSourceToDependencyDirectives(
588588
R"(_Pragma(R"abc(clang module import)abc"))", Out));
589589
EXPECT_STREQ("<TokBeforeEOF>\n", Out.data());

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Status
2424
=================================================== =================
2525
Macro Name Value
2626
=================================================== =================
27-
**C++ 14**
27+
**C++14**
2828
---------------------------------------------------------------------
2929
``__cpp_lib_chrono_udls`` ``201304L``
3030
--------------------------------------------------- -----------------
@@ -66,7 +66,7 @@ Status
6666
--------------------------------------------------- -----------------
6767
``__cpp_lib_tuples_by_type`` ``201304L``
6868
--------------------------------------------------- -----------------
69-
**C++ 17**
69+
**C++17**
7070
---------------------------------------------------------------------
7171
``__cpp_lib_addressof_constexpr`` ``201603L``
7272
--------------------------------------------------- -----------------
@@ -166,7 +166,7 @@ Status
166166
--------------------------------------------------- -----------------
167167
``__cpp_lib_void_t`` ``201411L``
168168
--------------------------------------------------- -----------------
169-
**C++ 20**
169+
**C++20**
170170
---------------------------------------------------------------------
171171
``__cpp_lib_array_constexpr`` ``201811L``
172172
--------------------------------------------------- -----------------
@@ -300,7 +300,7 @@ Status
300300
--------------------------------------------------- -----------------
301301
``__cpp_lib_unwrap_ref`` ``201811L``
302302
--------------------------------------------------- -----------------
303-
**C++ 23**
303+
**C++23**
304304
---------------------------------------------------------------------
305305
``__cpp_lib_adaptor_iterator_pair_constructor`` ``202106L``
306306
--------------------------------------------------- -----------------
@@ -388,7 +388,7 @@ Status
388388
--------------------------------------------------- -----------------
389389
``__cpp_lib_unreachable`` ``202202L``
390390
--------------------------------------------------- -----------------
391-
**C++ 26**
391+
**C++26**
392392
---------------------------------------------------------------------
393393
``__cpp_lib_associative_heterogeneous_insertion`` *unimplemented*
394394
--------------------------------------------------- -----------------

libcxx/include/__locale_dir/locale_base_api/ibm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ inline _LIBCPP_HIDE_FROM_ABI int vasprintf(char** strp, const char* fmt, va_list
100100
}
101101

102102
va_list ap_copy;
103-
// va_copy may not be provided by the C library in C++ 03 mode.
103+
// va_copy may not be provided by the C library in C++03 mode.
104104
#if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy)
105105
__builtin_va_copy(ap_copy, ap);
106106
#else

libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.volatile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//
1818
// If the library was built in c++23 mode, this test would succeed.
1919
//
20-
// Older CMake passed -std:c++latest to set C++ 20 mode on clang-cl, which
20+
// Older CMake passed -std:c++latest to set C++20 mode on clang-cl, which
2121
// hid this issue. With newer CMake versions, it passes -std:c++20 which
2222
// makes this fail.
2323
//

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ def pad_cell(s, length, left_align=True):
17691769
def get_status_table():
17701770
table = [["Macro Name", "Value"]]
17711771
for std in get_std_dialects():
1772-
table += [["**" + std.replace("c++", "C++ ") + "**", ""]]
1772+
table += [["**" + std.replace("c++", "C++") + "**", ""]]
17731773
for tc in feature_test_macros:
17741774
if std not in tc["values"].keys():
17751775
continue

llvm/docs/CMake.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
277277

278278
**CMAKE_CXX_STANDARD**:STRING
279279
Sets the C++ standard to conform to when building LLVM. Possible values are
280-
17 and 20. LLVM Requires C++ 17 or higher. This defaults to 17.
280+
17 and 20. LLVM Requires C++17 or higher. This defaults to 17.
281281

282282
**CMAKE_INSTALL_BINDIR**:PATH
283283
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.

0 commit comments

Comments
 (0)