Reapply r135075, but modify format-strings.c and format-strings-fixit.c test cases to be more portable with an explicit target triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135134 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/format-strings-i386.c b/test/Sema/format-strings-i386.c
new file mode 100644
index 0000000..45d10a7
--- /dev/null
+++ b/test/Sema/format-strings-i386.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -triple i386-apple-macosx10.7.0 -fsyntax-only -verify -Wformat-nonliteral %s
+
+int printf(const char *restrict, ...);
+
+// Test that 'long' is compatible with 'int' on 32-bit.
+typedef unsigned int UInt32;
+void test_rdar_9763999() {
+ UInt32 x = 7;
+ printf("x = %u\n", x); // no-warning
+}
+
+void test_positive() {
+  printf("%d", "hello"); // expected-warning {{conversion specifies type 'int' but the argument has type 'char *'}}
+}
+