r308073 - [clang] Fix format test
Alexander Shaposhnikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 14 18:06:59 PDT 2017
Author: alexshap
Date: Fri Jul 14 18:06:59 2017
New Revision: 308073
URL: http://llvm.org/viewvc/llvm-project?rev=308073&view=rev
Log:
[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
Modified:
cfe/trunk/test/FixIt/format.m
Modified: cfe/trunk/test/FixIt/format.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/format.m?rev=308073&r1=308072&r2=308073&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/format.m (original)
+++ cfe/trunk/test/FixIt/format.m Fri Jul 14 18:06:59 2017
@@ -230,14 +230,14 @@ void testSignedness(long i, unsigned lon
}
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.
}
More information about the cfe-commits
mailing list