implement PR3753, warning about comparisons with a string literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66387 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 45e1462..e307eb7 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -72,7 +72,12 @@
 #define MYMAX(A,B)    __extension__ ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
 
 struct mystruct {int A; };
-void foo(struct mystruct P, float F) {
+void test11(struct mystruct P, float F) {
   MYMAX(P, F);  // expected-error {{invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))}}
 }
 
+// PR3753
+int test12(const char *X) {
+  return X == "foo";  // expected-warning {{comparison against a string literal is undefined}}
+}
+