[libcxx-commits] [PATCH] D107755: [libcxx] [test] Generalize defines for skipping allocation checks

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 9 23:59:33 PDT 2021


mstorsjo added inline comments.


================
Comment at: libcxx/test/support/test_macros.h:418
+// don't work though.
+#define ASSERT_WITH_OPERATOR_NEW_FALLBACKS(...) ((void)(__VA_ARGS__))
 #else
----------------
NancyWang2222 wrote:
> NancyWang2222 wrote:
> > those __VA_ARGS__ set 0 on WIN32 only but still set on __MVS__. 
> nvm. I guess it is just checking condition and doesn't trigger assert
Yes, it was suggested to do it this way, to avoid warnings about unused variables when the assert isn't used. So now it evaluates the expression, but doesn't assert on it being true.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107755



More information about the libcxx-commits mailing list