From: Alexander Shaposhnikov Date: Sat, 15 Jul 2017 01:06:59 +0000 (+0000) Subject: [clang] Fix format test X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dca4d7828022a72ef903624731066d59f1e8b36e;p=clang [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 --- 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. }