Skip to content

Commit 5280439

Browse files
committed
Fix typo in diagnostic message
1 parent 62b4192 commit 5280439

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10275,7 +10275,7 @@ def warn_array_comparison : Warning<
1027510275
InGroup<DiagGroup<"array-compare">>;
1027610276

1027710277
def warn_array_comparison_cxx26 : Warning<
10278-
"comparison between two arrays is ll-formed in C++26; "
10278+
"comparison between two arrays is ill-formed in C++26; "
1027910279
"to compare array addresses, use unary '+' to decay operands to pointers">,
1028010280
InGroup<DiagGroup<"array-compare-cxx26">>, DefaultError;
1028110281

clang/test/Sema/warn-stringcompare.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ void test(const char *d) {
1616
if (NULL == "/")
1717
return;
1818
if ("/" != DELIM) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
19-
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
19+
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
2020
if (DELIM == "/") // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
21-
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
21+
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
2222
if (DELIM != NULL)
2323
return;
2424
if (NULL == DELIM)
2525
return;
2626
if (DOT != DELIM) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
27-
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
27+
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
2828
if (DELIM == DOT) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
29-
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
29+
return; // cxx-warning@-1 {{comparison between two arrays}} cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
3030
}

clang/test/SemaCXX/warn-array-comparion.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ typedef struct {
1010

1111
bool object_equal(const Object &obj1, const Object &obj2) {
1212
if (obj1.str != obj2.str) // not-cxx20-warning {{comparison between two arrays compare their addresses}} cxx20-warning {{comparison between two arrays is deprecated}}
13-
return false; // cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
13+
return false; // cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
1414
if (obj1.id != obj2.id) // not-cxx20-warning {{comparison between two arrays compare their addresses}} cxx20-warning {{comparison between two arrays is deprecated}}
15-
return false; // cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
15+
return false; // cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
1616
return true;
1717
}
1818

1919

2020
void foo(int (&array1)[2], int (&array2)[2]) {
2121
if (array1 == array2) { } // not-cxx20-warning {{comparison between two arrays compare their addresses}} cxx20-warning {{comparison between two arrays is deprecated}}
22-
// cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
22+
// cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
2323
}

clang/test/SemaCXX/warn-self-comparisons.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
void f(int (&array1)[2], int (&array2)[2]) {
66
if (array1 == array2) { } // not-cxx20-warning {{comparison between two arrays compare their addresses}} cxx20-warning {{comparison between two arrays is deprecated}}
7-
// cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
7+
// cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
88
}

0 commit comments

Comments
 (0)