[libcxx-commits] [PATCH] D107757: [libcxx] [test] Fix the new_faligned_allocation.pass.cpp test for MSVC

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 9 07:52:36 PDT 2021


mstorsjo added inline comments.


================
Comment at: libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.pass.cpp:80
     // And that it mangles the same in C++03 through C++17
+#ifdef _MSC_VER
+    // MSVC uses a different C++ ABI with a different name mangling scheme.
----------------
Quuxplusone wrote:
> Shouldn't this use `TEST_COMPILER_C1XX`? Tests generally don't mess with implementation macros like `_MSC_VER` directly, but only through the `test_macros.h` helpers.
This isn’t so much about the compiler itself, but the platform ABI. With clang-cl, you don’t get that macro defined, but only TEST_COMPILER_CLANG, while it obeys the Microsoft C++ ABI. I don’t see any existing defines there for that aspect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107757



More information about the libcxx-commits mailing list