[libcxx-dev] How to check for a feature-test macro
Stephan T. Lavavej via libcxx-dev
libcxx-dev at lists.llvm.org
Mon Dec 10 15:43:10 PST 2018
(+Casey who also works on this)
When running libcxx's tests against MSVC's STL, we have an MSVC-internal skipped_tests.txt (full content available if requested) which says:
# *** MISSING STL FEATURES ***
# C++20 P0122R7 "<span>"
# C++20 P0355R7 "<chrono> Calendars And Time Zones"
Updating this requires minimal effort. It's more problematic when existing tests are modified to test new features, since we have to skip the entire test even if only a small part is affected.
Guarding tests with feature-test macros in their source code (as opposed to "the LIT level", which I believe is machinery that we don't use) would be ideal, I think.
The annoying thing is when features are added without corresponding feature-test macros. There's a bunch of those right now. We'll probably need the skip-tests approach for those.
From: Jonathan Wakely <cxx at kayari.org>
Sent: Monday, December 10, 2018 12:10 PM
To: ldionne at apple.com
Cc: Richard Smith <richard at metafoo.co.uk>; Marshall Clow <mclow.lists at gmail.com>; libcxx-dev at lists.llvm.org; Stephan T. Lavavej <stl at exchange.microsoft.com>; Billy O'Neal (VC LIBS) <bion at microsoft.com>
Subject: Re: [libcxx-dev] How to check for a feature-test macro
On Mon, 10 Dec 2018 at 19:47, Louis Dionne wrote:
> We should also see how other implementations that use our test suite feel about this (CCing them).
I only use your tests a few times a year, run by hand. If I get a load of FAILs because I've not implemented something yet and you have, that's not a problem. I don't expect to get 100% green when I run your tests.
More information about the libcxx-dev