- Clang's "static assertion failed" diagnostic now points to the static assertion
expression instead of pointing to the ``static_assert`` token.
(`#61951 <https://github.com/llvm/llvm-project/issues/61951>`_)
+- ``-Wformat`` now recognizes ``%lb`` for the ``printf``/``scanf`` family of
+ functions.
+ (`#62247: <https://github.com/llvm/llvm-project/issues/62247>`_).
Bug Fixes in This Version
-------------------------
printf("abc%0f", "testing testing 123");
printf("%u", (long) -12);
printf("%b", (long) -13);
+ printf("%d", (long) -14);
printf("%p", 123);
printf("%c\n", "x");
printf("%c\n", 1.23);
// Preserve the original formatting.
scanf("%b", &longVar);
+ scanf("%d", &longVar);
scanf("%o", &longVar);
scanf("%u", &longVar);
scanf("%x", &longVar);
// CHECK: printf("%d", (int) 123);
// CHECK: printf("abc%s", "testing testing 123");
// CHECK: printf("%ld", (long) -12);
-// CHECK: printf("%ld", (long) -13);
+// CHECK: printf("%lb", (long) -13);
+// CHECK: printf("%ld", (long) -14);
// CHECK: printf("%d", 123);
// CHECK: printf("%s\n", "x");
// CHECK: printf("%f\n", 1.23);
// CHECK: scanf("%ju", (my_uintmax_type*)&uIntmaxVar);
// CHECK: scanf("%td", (my_ptrdiff_type*)&ptrdiffVar);
// CHECK: scanf("%d", (my_int_type*)&intVar);
+// CHECK: scanf("%lb", &longVar);
// CHECK: scanf("%ld", &longVar);
// CHECK: scanf("%lo", &longVar);
// CHECK: scanf("%lu", &longVar);
printf("%qp", (void *)0); // expected-warning{{length modifier 'q' results in undefined behavior or no effect with 'p' conversion specifier}}
printf("hhX %hhX", (unsigned char)10); // no-warning
printf("llX %llX", (long long) 10); // no-warning
+ printf("%lb %lB", (long) 10, (long) 10); // no-warning
printf("%llb %llB", (long long) 10, (long long) 10); // no-warning
// This is fine, because there is an implicit conversion to an int.
printf("%d", (unsigned char) 10); // no-warning