[libc++] ADL-proof <functional> by adding _VSTD:: qualification on calls.- std::reference_wrapper- std::function- std::mem_fnWhile I'm here, remove _VSTD:: qualification from calls to `declval`
[libc++] ADL-proof <functional> by adding _VSTD:: qualification on calls.- std::reference_wrapper- std::function- std::mem_fnWhile I'm here, remove _VSTD:: qualification from calls to `declval`because it takes no arguments and thus isn't susceptible to ADL.Differential Revision: https://reviews.llvm.org/D92884
show more ...
[runtimes] Use int main(int, char**) consistently in testsThis is needed when running the tests in Freestanding mode, where main()isn't treated specially. In Freestanding, main() doesn't get mangl
[runtimes] Use int main(int, char**) consistently in testsThis is needed when running the tests in Freestanding mode, where main()isn't treated specially. In Freestanding, main() doesn't get mangled asextern "C", so whatever runtime we're using fails to find the entry point.One way to solve this problem is to define a symbol alias from __Z4mainiPPcto _main, however this requires all definitions of main() to have the samemangling. Hence this commit.
[libc++] Remove the c++98 Lit feature from the test suiteC++98 and C++03 are effectively aliases as far as Clang is concerned.As such, allowing both std=c++98 and std=c++03 as Lit parameters isju
[libc++] Remove the c++98 Lit feature from the test suiteC++98 and C++03 are effectively aliases as far as Clang is concerned.As such, allowing both std=c++98 and std=c++03 as Lit parameters isjust slightly confusing, but provides no value. It's similar to allowingboth std=c++17 and std=c++1z, which we don't do.This was discovered because we had an internal bot that ran the testsuite under both c++98 AND c++03 -- one of which is redundant.Differential Revision: https://reviews.llvm.org/D80926
[libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markupBy renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp,the new test format will not try to
[libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markupBy renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp,the new test format will not try to compile these tests with clang-verify,and the old test format will work just the same. However, this allowsremoving a workaround that requires parsing each test looking forclang-verify markup.After this change, a .fail.cpp test should always have clang-verify markup.When clang-verify is not supported by the compiler, we will just check thatthese tests fail to compile. When clang-verify is supported, these testswill be compiled with clang-verify whether they have markup or not (sothey should have markup, or they will fail).This simplifies the test suite and also ensures that all of our .fail.cpptests provide clang-verify markup. If it's impossible for a test to haveclang-verify markup, it can be moved to a .compile.fail.cpp test, whichare unconditionally just checked for compilation failure.
Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended.llvm-svn: 362252
[libcxx] Make sure reference_wrapper works with incomplete typesSummary: Completes P0357R3, which was merged into the C++20 Working Draft in San Diego.Reviewers: EricWF, mclow.listsSubscribers:
[libcxx] Make sure reference_wrapper works with incomplete typesSummary: Completes P0357R3, which was merged into the C++20 Working Draft in San Diego.Reviewers: EricWF, mclow.listsSubscribers: christof, jkorous, dexonsmith, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D54722llvm-svn: 357423
Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I
Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I'd like to make libc++ behave better with what freestanding shouldbe, so that it can be a tool we use in improving the standard. To do that weneed to try stuff out, both with "freestanding the language mode" and"freestanding the library subset".Let's start with the super basic: run the libc++ tests in freestanding, usingclang as the compiler, and see what works. The easiest hack to do this:In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding']Run the tests and they all fail.Why? Because in freestanding `main` isn't special. This "not special" propertyhas two effects: main doesn't get mangled, and main isn't allowed to omit its`return` statement. The first means main gets mangled and the linker can'tcreate a valid executable for us to test. The second means we spew out warnings(ew) and the compiler doesn't insert the `return` we omitted, and main justfalls of the end and does whatever undefined behavior (if you're luck, ud2leading to non-zero return code).Let's start my work with the basics. This patch changes all libc++ tests todeclare `main` as `int main(int, char**` so it mangles consistently (enabling usto declare another `extern "C"` main for freestanding which calls the mangledone), and adds `return 0;` to all places where it was missing. This touches 6124files, and I apologize.The former was done with The Magic Of Sed.The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feedThis works for most tests, though I did have to adjust a few places when e.g.the test runs with `-x c`, macros are used for main (such as for the filesystemtests), etc.Once this is in we can create a freestanding bot which will prevent furtherregressions. After that, we can start the real work of supporting C++freestanding fairly well in libc++.<rdar://problem/47754795>Reviewers: ldionne, mclow.lists, EricWFSubscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D57624llvm-svn: 353086
Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that
Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that people may be surprised that we're moving the headerentirely to discuss the new license. We checked this carefully with theFoundation's lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351648
Move test into test/std subdirectory.llvm-svn: 224658