[libc++] Add missing __format__ attributes

Authored by ldionne on Nov 16 2021, 12:22 PM.


[libc++] Add missing format attributes

-Wformat-nonliteral was turned on in https://reviews.llvm.org/D112927,
however we forgot to apply some format attributes in Linux specific
code paths, which led to warnings when building on Linux. This patch
addresses that oversight.

Differential Revision: https://reviews.llvm.org/D113876