From: Saleem Abdulrasool Date: Wed, 19 Sep 2018 18:41:07 +0000 (+0000) Subject: test: improve condition for the check X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27a174792cc4762f75cc44ad25b527c4813a8eeb;p=clang test: improve condition for the check When the type of `wint_t` is `int`, the promotion will allow this to pass. Check this explicitly rather than using the size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342569 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index 6630acdbc2..20b9496663 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -401,7 +401,7 @@ void bug7377_bad_length_mod_usage() { void pr7981(wint_t c, wchar_t c2) { printf("%lc", c); // no-warning printf("%lc", 1.0); // expected-warning{{the argument has type 'double'}} -#if __WINT_WIDTH__ == 4 +#if __WINT_TYPE__ == int printf("%lc", (char) 1); // no-warning #else printf("%lc", (char) 1); // expected-warning{{the argument has type 'char'}}