[libcxx-commits] [PATCH] D112927: [libc++] Enable -Wformat-nonliteral when building libc++

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 1 07:45:04 PDT 2021


Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.

> because Clang doesn't support putting `__attribute__((format(...)))` on variadic templates

D112579 <https://reviews.llvm.org/D112579> is related.



================
Comment at: libcxx/include/locale:1620
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
     int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
+#pragma clang diagnostic pop
----------------
Why on earth is this not just `s/__fmt/"%p"/`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112927/new/

https://reviews.llvm.org/D112927



More information about the libcxx-commits mailing list