aboutsummaryrefslogtreecommitdiff
path: root/clang/test/FixIt
diff options
context:
space:
mode:
authorYingChi Long <me@inclyc.cn>2022-09-01 11:25:41 +0800
committerYingChi Long <me@inclyc.cn>2022-09-01 13:30:40 +0800
commit5ee51e8154253088b333c8e82c64d0f00d7d0524 (patch)
tree1f786603e165f58f4921fc5bd3284817a6da206b /clang/test/FixIt
parented241e873009dd0a32c6eb0dc02885d37c05e1cd (diff)
downloadllvm-5ee51e8154253088b333c8e82c64d0f00d7d0524.zip
llvm-5ee51e8154253088b333c8e82c64d0f00d7d0524.tar.gz
llvm-5ee51e8154253088b333c8e82c64d0f00d7d0524.tar.bz2
[clang] trim trailing space in format tests. NFC
Found in https://reviews.llvm.org/D132568 Differential Revision: https://reviews.llvm.org/D133085
Diffstat (limited to 'clang/test/FixIt')
-rw-r--r--clang/test/FixIt/format.m12
-rw-r--r--clang/test/FixIt/format.mm4
2 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/FixIt/format.m b/clang/test/FixIt/format.m
index 966cf79..950765b 100644
--- a/clang/test/FixIt/format.m
+++ b/clang/test/FixIt/format.m
@@ -37,7 +37,7 @@ void test_string_correction (char *x) {
// CHECK: fix-it:"{{.*}}":{34:11-34:13}:"%s"
}
-void test_object_correction (id x) {
+void test_object_correction (id x) {
NSLog(@"%d", x); // expected-warning{{format specifies type 'int' but the argument has type 'id'}}
NSLog(@"%s", x); // expected-warning{{format specifies type 'char *' but the argument has type 'id'}}
NSLog(@"%lf", x); // expected-warning{{format specifies type 'double' but the argument has type 'id'}}
@@ -108,7 +108,7 @@ void test_char(char c, signed char s, unsigned char u, uint8_t n) {
NSLog(@"%c", c); // no-warning
// CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%c"
-
+
NSLog(@"%s", s); // expected-warning{{format specifies type 'char *' but the argument has type 'signed char'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%c"
@@ -197,11 +197,11 @@ void test_percent_C(void) {
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:16-[[@LINE-2]]:16}:"(unsigned short)"
typedef unsigned short unichar;
-
+
NSLog(@"%C", 0x260300); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'int'}}
// CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%d"
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:16-[[@LINE-2]]:16}:"(unichar)"
-
+
NSLog(@"%C", data ? 0x2F0000 : 0x260300); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'int'}}
// CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%d"
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:16-[[@LINE-2]]:16}:"(unichar)("
@@ -239,7 +239,7 @@ void testSizeTypes(void) {
printf("%zd", 0.f); // expected-warning-re{{format specifies type 'ssize_t' (aka '{{.+}}') but the argument has type 'float'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:14}:"%f"
-
+
short x;
#if !defined(__ANDROID__) && !defined(__Fuchsia__)
printf("%zn", &x); // expected-warning-re{{format specifies type 'ssize_t *' (aka '{{.+}}') but the argument has type 'short *'}}
@@ -266,7 +266,7 @@ void testPtrDiffTypes(void) {
printf("%tu", 0.f); // expected-warning-re{{format specifies type 'unsigned ptrdiff_t' (aka '{{.+}}') but the argument has type 'float'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:14}:"%f"
-
+
ptrdiff_t p2 = 0;
printf("%td", p2); // No warning.
diff --git a/clang/test/FixIt/format.mm b/clang/test/FixIt/format.mm
index 9d89c06..eed7c98 100644
--- a/clang/test/FixIt/format.mm
+++ b/clang/test/FixIt/format.mm
@@ -19,11 +19,11 @@ void test_percent_C() {
NSLog(@"%C", wchar_data); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'wchar_t'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:16-[[@LINE-1]]:16}:"(unichar)"
-
+
NSLog(@"%C", 0x260300); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'int'}}
// CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%d"
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:16-[[@LINE-2]]:16}:"(unichar)"
-
+
NSLog(@"%C", 0.0); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'double'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%f"
// CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-2]]:16-[[@LINE-2]]:16}:"(unichar)"