[patch] [libcxx[ test suite temp file and __config fix

G M gmisocpp at gmail.com
Sun Oct 6 17:25:00 PDT 2013

On Sun, Oct 6, 2013 at 6:47 PM, Marshall Clow <mclow.lists at gmail.com> wrote:

> On Oct 4, 2013, at 8:22 AM, G M <gmisocpp at gmail.com> wrote:
> > Hi Everyone / Howard / Reid
> >
> > Attached is a patch for the libcxx test suite. This patch does a few
> things.
> >
> > 1. It changes the temp file handling to use the template and the current
> directory for windows, matching how it works on other platforms.
> > 2. It re-enables the temp file handling for mingw that regressed.
> > 3. It removes the explicit inclusion of __config from a very minority
> number of recent-ish files that explicitly include it.
> >
> > __config is always implicitly included in the other test cases by other
> headers and it is inconsistent to do otherwise for the few changed in the
> patch.
> There's a reason these test files explicitly include <__config>
> The <dynarray> tests are empty unless you are compiling for C++14.
> But the test (_LIBCPP_STD_VER > 11) is not a valid test (i.e,
> _LIBCPP_STD_VER doesn't get defined) unless you include a libc++ header
> file.
> <__config> is where _LIBCPP_STD_VER gets set.
> So, we have to include _something_ before testing.
> <__config> is small, has no other dependencies, and sets the variable we
> need to test.
> > Making it implicit has the advantage that the test cases can be compiled
> by other compilers which can be useful in testing those compilers and using
> those compilers to verify if the test cases themselves have all the right
> dependencies.
> <__config> is not a compiler-specific thing.
> It's a libc++-specific thing; and this is the libc++ test suite.

-- Marshall
 I was not meaning to suggest that __config was compiler specific, I was
making the statement that specifically including __config ties the test to
libcxx and that we probably shouldn't do that unless it's necessary. Some
tests may be specific to libcxx but many aren't and being able to compile
them with other compilers can reveal mistakes in libcxx such as unwanted
dependencies. I think that argument is sound. Even if it is the libcxx test

By the way, (not that it's a big deal) I wonder
if platform_support.h should include cstdio and cstdlib.or do these
specifically need the C versions?

Using --include __config on the command line in testit would solve that
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131007/bf6cae91/attachment.html>

More information about the cfe-commits mailing list