[libcxx-commits] [PATCH] D113876: [libc++] Add missing __format__ attributes

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 16 13:27:11 PST 2021


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

LGTM modulo one remark.



================
Comment at: libcxx/include/__config:1355
 #if defined(__GNUC__) || defined(__clang__)
-#define _LIBCPP_FORMAT_PRINTF(a, b)                                            \
-  __attribute__((__format__(__printf__, a, b)))
+  // The attribute uses 1-based indices.
+# define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) \
----------------
I like the comment, but let's expand it a bit.

This change looks very familiar. I'm quite sure something similar has been up for review before, but seems it never landed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113876



More information about the libcxx-commits mailing list