1 // RUN: %clang_cc1 -x c -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -x c++ -fsyntax-only -verify %s
8 void test(const char *d
) {
9 if ("/" != d
) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
11 if (d
== "/") // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
17 if ("/" != DELIM
) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
19 if (DELIM
== "/") // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
25 if (DOT
!= DELIM
) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}
27 if (DELIM
== DOT
) // expected-warning {{result of comparison against a string literal is unspecified (use an explicit string comparison function instead)}}