[libcxx-commits] [PATCH] D121530: [WIP][libc++][format] Implement format-string.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 14 09:43:20 PDT 2022


Mordante added inline comments.


================
Comment at: libcxx/test/std/utilities/format/format.functions/format_tests.h:33
+#  define CALL_CHECK_FUNCTION(f) f()
+#  define check_ill_formed(what, fmt, ...)                                                                             \
+    static_assert([]<class = void>() {                                                                                 \
----------------
EricWF wrote:
> No. Absolutely not.
> 
> We need to find a simpler way to write this in normal code. They can be reused reasonably. But this is way too complex to be at the root of correct tests. By the time these macros are used, who can have any idea what's going on.
> 
> I apologize for being terse
@EricWF I agree, I'm not happy with this approach either. I posted it with `[WIP]` in the title for that reason. I wanted to it in the weekend since then a known bad patch doesn't take up too long on the CI.

I'll will post on Discord to see what a better approach will might be. (There are some caveats with this code.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121530



More information about the libcxx-commits mailing list