diff options
author | Alexander Shaposhnikov <shal1t712@gmail.com> | 2017-07-15 01:06:59 +0000 |
---|---|---|
committer | Alexander Shaposhnikov <shal1t712@gmail.com> | 2017-07-15 01:06:59 +0000 |
commit | dca4d7828022a72ef903624731066d59f1e8b36e (patch) | |
tree | 11072927e9d88d2dda744ba8aef9f41c69d7c6fd /test/FixIt | |
parent | da2ce2e0d1fc5a79cabe7d7222246f4de98f53f0 (diff) |
[clang] Fix format test
This diff makes the test FixIt/format.m more robust.
The issue was caught by the build bot clang-cmake-thumbv7-a15.
Test plan: make check-all
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt')
-rw-r--r-- | test/FixIt/format.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/FixIt/format.m b/test/FixIt/format.m index f676c24cac..5806f22c0a 100644 --- a/test/FixIt/format.m +++ b/test/FixIt/format.m @@ -230,14 +230,14 @@ void testSignedness(long i, unsigned long u) { } void testSizeTypes() { - printf("%zu", 0.f); // expected-warning{{format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'float'}} + printf("%zu", 0.f); // expected-warning-re{{format specifies type 'size_t' (aka '{{.+}}') but the argument has type 'float'}} // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:14}:"%f" - printf("%zd", 0.f); // expected-warning{{format specifies type 'ssize_t' (aka 'long') but the argument has type 'float'}} + 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" int x; - printf("%zn", &x); // expected-warning{{format specifies type 'ssize_t *' (aka 'long *') but the argument has type 'int *'}} + printf("%zn", &x); // expected-warning-re{{format specifies type 'ssize_t *' (aka '{{.+}}') but the argument has type 'int *'}} // PrintfSpecifier::fixType doesn't handle %n, so a fix-it is not emitted, // see the comment in PrintfSpecifier::fixType in PrintfFormatString.cpp. } |