Skip to content

Commit 0f350a6

Browse files
committed
Use regular expressions to match the output to fix test failures on Windows
1 parent 27c5862 commit 0f350a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/Sema/format-strings-scanf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ void test_ptrdiff_t_types(void) {
231231
scanf("%td", &p2); // No warning.
232232

233233
double d2 = 0.;
234-
scanf("%td", &d2); // expected-warning{{format specifies type 'ptrdiff_t *' (aka 'long *') but the argument has type 'double *'}}
234+
scanf("%td", &d2); // expected-warning-re{{format specifies type 'ptrdiff_t *' (aka '{{.+}}') but the argument has type 'double *'}}
235235

236236
ptrdiff_t p3 = 0;
237237
scanf("%tn", &p3); // No warning.
238238

239239
double d3 = 0.;
240-
scanf("%tn", &d3); // expected-warning{{format specifies type 'ptrdiff_t *' (aka 'long *') but the argument has type 'double *'}}
240+
scanf("%tn", &d3); // expected-warning-re{{format specifies type 'ptrdiff_t *' (aka '{{.+}}') but the argument has type 'double *'}}
241241
}
242242

243243
void check_conditional_literal(char *s, int *i) {

0 commit comments

Comments
 (0)