1 // RUN: %clang_cc1 -verify -fsyntax-only -Wstring-conversion %s 2 3 #define assert(EXPR) (void)(EXPR); 4 5 // Expection for common assert form. 6 void test1() { 7 assert(0 && "foo"); 8 assert("foo" && 0); 9 assert(0 || "foo"); // expected-warning {{string literal}} 10 } 11 12 void test2() { 13 if ("hi") {} // expected-warning {{string literal}} 14 while ("hello") {} // expected-warning {{string literal}} 15 for (;"howdy";) {} // expected-warning {{string literal}} 16 do { } while ("hey"); // expected-warning {{string literal}} 17 } 18