Skip to content

Commit 87a5513

Browse files
briantracymordante
authored andcommitted
Fix "the the" typo in documentation and user facing strings
There are many more instances of this pattern, but I chose to limit this change to .rst files (docs), anything in libcxx/include, and string literals. These have the highest chance of being seen by end users. Reviewed By: #libc, Mordante, martong, ldionne Differential Revision: https://reviews.llvm.org/D124708
1 parent f0d6cb4 commit 87a5513

File tree

16 files changed

+35
-35
lines changed

16 files changed

+35
-35
lines changed

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3998,7 +3998,7 @@ Note that ``-ffp-contract=fast`` will override pragmas to fuse multiply and
39983998
addition across statements regardless of any controlling pragmas.
39993999
40004000
``#pragma clang fp exceptions`` specifies floating point exception behavior. It
4001-
may take one the the values: ``ignore``, ``maytrap`` or ``strict``. Meaning of
4001+
may take one of the values: ``ignore``, ``maytrap`` or ``strict``. Meaning of
40024002
these values is same as for `constrained floating point intrinsics <http://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics>`_.
40034003
40044004
.. code-block:: c++

clang/docs/MatrixTypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Definitions:
208208
``M2 __builtin_matrix_transpose(M1 matrix)``
209209

210210
**Remarks**: The return type is a cv-unqualified matrix type that has the same
211-
element type as ``M1`` and has the the same number of rows as ``M1`` has columns and
211+
element type as ``M1`` and has the same number of rows as ``M1`` has columns and
212212
the same number of columns as ``M1`` has rows.
213213

214214
**Returns**: A matrix ``Res`` equivalent to the code below, where ``col`` refers to the

clang/docs/UndefinedBehaviorSanitizer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Available checks are:
114114
Issues caught by these sanitizers are not undefined behavior,
115115
but are often unintentional.
116116
- ``-fsanitize=implicit-integer-sign-change``: Implicit conversion between
117-
integer types, if that changes the sign of the value. That is, if the the
117+
integer types, if that changes the sign of the value. That is, if the
118118
original value was negative and the new value is positive (or zero),
119119
or the original value was positive, and the new value is negative.
120120
Issues caught by this sanitizer are not undefined behavior,

clang/docs/analyzer/checkers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ Here, ``ptr`` is the buffer, and its minimum size is ``size * nmemb``
24662466
24672467
// Below we receive a warning because the 3rd parameter should be the
24682468
// number of elements to read, not the size in bytes. This case is a known
2469-
// vulnerability described by the the ARR38-C SEI-CERT rule.
2469+
// vulnerability described by the ARR38-C SEI-CERT rule.
24702470
fread(wbuf, size, nitems, file);
24712471
}
24722472

clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void InvalidPtrChecker::postPreviousReturnInvalidatingCall(
132132
return;
133133
Out << '\'';
134134
FD->getNameForDiagnostic(Out, FD->getASTContext().getLangOpts(), true);
135-
Out << "' call may invalidate the the result of the previous " << '\'';
135+
Out << "' call may invalidate the result of the previous " << '\'';
136136
FD->getNameForDiagnostic(Out, FD->getASTContext().getLangOpts(), true);
137137
Out << '\'';
138138
});

clang/test/Analysis/cert/env34-c.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void getenv_test2(void) {
3939
*p; // no-warning
4040

4141
p2 = getenv("VAR2");
42-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
42+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
4343

4444
*p;
4545
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -55,7 +55,7 @@ void getenv_test3(void) {
5555
p = getenv("VAR2");
5656
// expected-note@-1{{previous function call was here}}
5757
p2 = getenv("VAR2");
58-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
58+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
5959

6060
p3 = getenv("VAR3");
6161

@@ -70,7 +70,7 @@ void getenv_test4(void) {
7070
p = getenv("VAR");
7171
// expected-note@-1{{previous function call was here}}
7272
p2 = getenv("VAR2");
73-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
73+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
7474
p3 = getenv("VAR3");
7575

7676
*p;
@@ -85,7 +85,7 @@ void getenv_test5(void) {
8585
p2 = getenv("VAR2");
8686
// expected-note@-1{{previous function call was here}}
8787
p3 = getenv("VAR3");
88-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
88+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
8989

9090
*p2;
9191
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -103,7 +103,7 @@ void getenv_test6(void) {
103103

104104
p2 = getenv("VAR3");
105105
// expected-note@-1{{previous function call was here}}
106-
// expected-note@-2{{'getenv' call may invalidate the the result of the previous 'getenv'}}
106+
// expected-note@-2{{'getenv' call may invalidate the result of the previous 'getenv'}}
107107

108108
*p;
109109
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -112,7 +112,7 @@ void getenv_test6(void) {
112112
*p2; // no-warning
113113

114114
p = getenv("VAR4");
115-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
115+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
116116

117117
*p; // no-warning
118118
*p2;
@@ -127,7 +127,7 @@ void getenv_test7(void) {
127127
*p; // no-warning
128128

129129
p2 = getenv("VAR2");
130-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
130+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
131131

132132
foo(p);
133133
// expected-warning@-1{{use of invalidated pointer 'p' in a function call}}
@@ -152,7 +152,7 @@ void getenv_test8(void) {
152152
if( !array[1] )
153153
// expected-note@-1{{Taking true branch}}
154154
array[1] = getenv("TMPDIR");
155-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
155+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
156156

157157
*array[0];
158158
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -169,7 +169,7 @@ void getenv_test9(void) {
169169

170170
void getenv_test10(void) {
171171
strcmp(getenv("VAR1"), getenv("VAR2"));
172-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
172+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
173173
// expected-note@-2{{previous function call was here}}
174174
// expected-warning@-3{{use of invalidated pointer 'getenv("VAR1")' in a function call}}
175175
// expected-note@-4{{use of invalidated pointer 'getenv("VAR1")' in a function call}}
@@ -186,7 +186,7 @@ void getenv_test11(void) {
186186
// expected-note@-1{{previous function call was here}}
187187

188188
char *pp = getenv("VAR2");
189-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
189+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
190190

191191
dereference_pointer(p);
192192
// expected-note@-1{{Calling 'dereference_pointer'}}
@@ -200,7 +200,7 @@ void getenv_test12(int flag1, int flag2) {
200200
// expected-note@-1{{Assuming 'flag1' is not equal to 0}}
201201
// expected-note@-2{{Taking true branch}}
202202
char *pp = getenv("VAR2");
203-
// expected-note@-1{{'getenv' call may invalidate the the result of the previous 'getenv'}}
203+
// expected-note@-1{{'getenv' call may invalidate the result of the previous 'getenv'}}
204204
}
205205

206206
if (flag2) {
@@ -222,7 +222,7 @@ void setlocale_test1(void) {
222222
*p; // no-warning
223223

224224
p2 = setlocale(0, "VAR3");
225-
// expected-note@-1{{'setlocale' call may invalidate the the result of the previous 'setlocale'}}
225+
// expected-note@-1{{'setlocale' call may invalidate the result of the previous 'setlocale'}}
226226

227227
*p;
228228
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -242,7 +242,7 @@ void setlocale_test2(int flag) {
242242
// expected-note@-1{{Assuming 'flag' is not equal to 0}}
243243
// expected-note@-2{{Taking true branch}}
244244
p2 = setlocale(0, "VAR3");
245-
// expected-note@-1{{'setlocale' call may invalidate the the result of the previous 'setlocale'}}
245+
// expected-note@-1{{'setlocale' call may invalidate the result of the previous 'setlocale'}}
246246
}
247247

248248
*p;
@@ -261,7 +261,7 @@ void strerror_test1(void) {
261261
*p; // no-warning
262262

263263
p2 = strerror(2);
264-
// expected-note@-1{{'strerror' call may invalidate the the result of the previous 'strerror'}}
264+
// expected-note@-1{{'strerror' call may invalidate the result of the previous 'strerror'}}
265265

266266
*p;
267267
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -290,7 +290,7 @@ void strerror_test2(int errno) {
290290
// expected-note@-1{{Assuming 'errno' is not equal to 0}}
291291
// expected-note@-2{{Taking true branch}}
292292
p2 = strerror(errno);
293-
// expected-note@-1{{'strerror' call may invalidate the the result of the previous 'strerror'}}
293+
// expected-note@-1{{'strerror' call may invalidate the result of the previous 'strerror'}}
294294
}
295295

296296
*p;
@@ -305,7 +305,7 @@ void asctime_test(void) {
305305
char* p = asctime(t);
306306
// expected-note@-1{{previous function call was here}}
307307
char* pp = asctime(tt);
308-
// expected-note@-1{{'asctime' call may invalidate the the result of the previous 'asctime'}}
308+
// expected-note@-1{{'asctime' call may invalidate the result of the previous 'asctime'}}
309309

310310
*p;
311311
// expected-warning@-1{{dereferencing an invalid pointer}}
@@ -316,7 +316,7 @@ void localeconv_test1(void) {
316316
lconv *lc1 = localeconv();
317317
// expected-note@-1{{previous function call was here}}
318318
lconv *lc2 = localeconv();
319-
// expected-note@-1{{'localeconv' call may invalidate the the result of the previous 'localeconv'}}
319+
// expected-note@-1{{'localeconv' call may invalidate the result of the previous 'localeconv'}}
320320

321321
*lc1;
322322
// expected-warning@-1{{dereferencing an invalid pointer}}

libcxx/include/__iterator/advance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ struct __fn {
141141
// * If `n > 0`, [i, bound) denotes a range.
142142
// * If `n == 0`, [i, bound) or [bound, i) denotes a range.
143143
// * If `n < 0`, [bound, i) denotes a range, `I` models `bidirectional_iterator`, and `I` and `S` model `same_as<I, S>`.
144-
// Returns: `n - M`, where `M` is the difference between the the ending and starting position.
144+
// Returns: `n - M`, where `M` is the difference between the ending and starting position.
145145
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
146146
_LIBCPP_HIDE_FROM_ABI
147147
constexpr iter_difference_t<_Ip> operator()(_Ip& __i, iter_difference_t<_Ip> __n, _Sp __bound) const {

libcxx/src/filesystem/operations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ path path::lexically_relative(const path& base) const {
18841884
if (ElemCount == 0 && (PP.atEnd() || *PP == PATHSTR("")))
18851885
return PATHSTR(".");
18861886

1887-
// return a path constructed with 'n' dot-dot elements, followed by the the
1887+
// return a path constructed with 'n' dot-dot elements, followed by the
18881888
// elements of '*this' after the mismatch.
18891889
path Result;
18901890
// FIXME: Reserve enough room in Result that it won't have to re-allocate.

llvm/docs/AMDGPUUsage.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,17 +3627,17 @@ Code object V5 metadata is the same as
36273627
is 1 or 2, then must be 1.
36283628

36293629
"hidden_remainder_x"
3630-
The grid dispatch work group size of the the partial work group
3630+
The grid dispatch work group size of the partial work group
36313631
of the X dimension, if it exists. Must be zero if a partial
36323632
work group does not exist in the X dimension.
36333633

36343634
"hidden_remainder_y"
3635-
The grid dispatch work group size of the the partial work group
3635+
The grid dispatch work group size of the partial work group
36363636
of the Y dimension, if it exists. Must be zero if a partial
36373637
work group does not exist in the Y dimension.
36383638

36393639
"hidden_remainder_z"
3640-
The grid dispatch work group size of the the partial work group
3640+
The grid dispatch work group size of the partial work group
36413641
of the Z dimension, if it exists. Must be zero if a partial
36423642
work group does not exist in the Z dimension.
36433643

llvm/docs/BugLifeCycle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Actively working on fixing bugs
9999

100100
Please remember to assign the bug to yourself if you're actively working on
101101
fixing it and to unassign it when you're no longer actively working on it. You
102-
unassign a bug by removing the person from the the ``Assignees`` field.
102+
unassign a bug by removing the person from the ``Assignees`` field.
103103

104104
.. _Closing:
105105

0 commit comments

Comments
 (0)