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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 25 13:06:07 PST 2021


ldionne accepted this revision as: libc++.
ldionne added a comment.
This revision is now accepted and ready to land.

Will ship once CI passes.



================
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) \
----------------
Mordante wrote:
> 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.
Yeah, now that you mention it this does seem to ring a bell for me too. But in any case, it hasn't landed yet so I guess we'll eventually stumble upon the change while clearing the review queue.


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