diff --git a/test/FixIt/format-darwin.m b/test/FixIt/format-darwin.m index 170bb09fb90473d411a57261c26e19dfe0ab49e6..52d562669f5d187ed9a12e749f306bb76dd2179f 100644 --- a/test/FixIt/format-darwin.m +++ b/test/FixIt/format-darwin.m @@ -83,12 +83,12 @@ void testParens(Foo *obj, struct Bar *record) { printf("%s", [obj getInteger]); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} printf("%s", obj.value); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} printf("%s", record->value); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} - printf("%s", (i ? i : i)); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} + printf("%s", (i ? i : i)); // expected-warning{{format specifies type 'char *' but the argument has type 'int'}} printf("%s", *arr); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} // CHECK-NOT: fix-it:{{.*}}:")" - printf("%s", i ? i : i); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} + printf("%s", i ? i : i); // expected-warning{{format specifies type 'char *' but the argument has type 'int'}} // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:13}:"%ld" // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:16-[[@LINE-3]]:16}:"(long)(" diff --git a/test/SemaObjC/format-strings-objc.m b/test/SemaObjC/format-strings-objc.m index 49567a710c3a5a1fa966613d9632d90500383c4f..f4c528cc7ac04833e8289fcfb8354f7b0a5b4ad5 100644 --- a/test/SemaObjC/format-strings-objc.m +++ b/test/SemaObjC/format-strings-objc.m @@ -243,7 +243,7 @@ void testByValueObjectInFormat(Foo *obj) { // <rdar://problem/13557053> void testTypeOf(NSInteger dW, NSInteger dH) { - NSLog(@"dW %d dH %d",({ __typeof__(dW) __a = (dW); __a < 0 ? -__a : __a; }),({ __typeof__(dH) __a = (dH); __a < 0 ? -__a : __a; })); // expected-warning 2 {{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}} + NSLog(@"dW %d dH %d",({ __typeof__(dW) __a = (dW); __a < 0 ? -__a : __a; }),({ __typeof__(dH) __a = (dH); __a < 0 ? -__a : __a; })); // expected-warning 2 {{format specifies type 'int' but the argument has type 'long'}} } void testUnicode() {