[libcxx-commits] [PATCH] D96986: [libc++] Drop template layer when using vsnprintf

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 8 05:37:42 PST 2021

Quuxplusone added inline comments.

Comment at: libcxx/include/__config:1452
+#ifdef __GNUC__
+#  define _LIBCPP_PRINTFILE(fmtarg, firstvararg) \
curdeius wrote:
> joerg wrote:
> > curdeius wrote:
> > > Does clang-cl support this attribute? If yes, then it should be `#if defined(__GNUC_) || defined(__clang__)`.
> > It seems to work as is with clang-cl.
> I just tested it and `__GNUC__` is *not* defined by clang-cl.
> Please adjust.
> Or @Quuxplusone, please update this in D98097, depending on how you both want to proceed.
I would like to proceed with D98097, and @joerg has said D98097 works for him as well. It's still waiting on libc++ approval though, so, ping! :)
I'm only 75% sure I understand what you're requesting here. I think you're saying that all Clangs //do// support `__attribute__((format(printf)))` with the right semantics, and clang-cl is an example of a Clang that //doesn't// define `__GNUC__`, so therefore we should change this to `#if defined(__GNUC__) || defined(__clang__)`. Right? I'll do that in D98097.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list