[libcxx-commits] [PATCH] D122574: [libcxx] [test] Use LIBCPP_ASSERT for libc++-specific checks

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 28 11:18:10 PDT 2022


ldionne accepted this revision.
ldionne added a comment.

LGTM with a suggestion. Thanks for catching those Jonathan!



================
Comment at: libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp:41
     assert(std::regex_constants::collate != 0);
-#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO  // https://llvm.org/PR35967
+#if defined _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO || !defined _LIBCPP_VERSION
+    // https://llvm.org/PR35967
----------------
Would you mind reversing those conditions? For some reason, I find `#if !defined(_LIBCPP_VERSION) || defined(_LIBCPP_ABI_REGEX_CONSTANTS_NONZERO)` to be much easier to understand.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122574



More information about the libcxx-commits mailing list