[libc] [flang] [llvm] [clang] [clang-tools-extra] Fix clang to recognize new C23 modifiers %w and %wf when printing (PR #71771)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 10:50:40 PST 2023


================
@@ -85,4 +86,31 @@ void z_test(void *p) {
   scanf("%Z", p); // expected-warning{{invalid conversion specifier 'Z'}}
 }
 
+void w_int_test(void) {
----------------
AaronBallman wrote:

The printed result will depend on the C standard library used, so there's no way to verify that here. As for unsupported sizes, I think those should be emitted as a warning; you'll likely need to add a new warning for this along the lines of "format specifies %select{an exact-|a fastest-}0width integer type with invalid bit-width %1".

https://github.com/llvm/llvm-project/pull/71771


More information about the cfe-commits mailing list