You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang/test/Sema/warn-stringcompare.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ void test(const char *d) {
16
16
if (NULL=="/")
17
17
return;
18
18
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}}
20
20
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}}
22
22
if (DELIM!=NULL)
23
23
return;
24
24
if (NULL==DELIM)
25
25
return;
26
26
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}}
28
28
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}}
if (obj1.str != obj2.str) // not-cxx20-warning {{comparison between two arrays compare their addresses}} cxx20-warning {{comparison between two arrays is deprecated}}
13
-
returnfalse; // cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
13
+
returnfalse; // cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
14
14
if (obj1.id != obj2.id) // not-cxx20-warning {{comparison between two arrays compare their addresses}} cxx20-warning {{comparison between two arrays is deprecated}}
15
-
returnfalse; // cxx26-error@-1 {{comparison between two arrays is ll-formed in C++26}}
15
+
returnfalse; // cxx26-error@-1 {{comparison between two arrays is ill-formed in C++26}}
16
16
returntrue;
17
17
}
18
18
19
19
20
20
voidfoo(int (&array1)[2], int (&array2)[2]) {
21
21
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}}
Copy file name to clipboardExpand all lines: clang/test/SemaCXX/warn-self-comparisons.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,5 @@
4
4
5
5
voidf(int (&array1)[2], int (&array2)[2]) {
6
6
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}}
0 commit comments