- Apr 02, 2013
-
-
Howard Hinnant authored
The cmake script is failing to copy cxxabi.h to the right place because it was generating to destination path like so /include// and dstdir can legally be blank from my interpretation of the script, and this would then generate a path like libcxx/include// which is illegal. llvm-svn: 178579
-
Howard Hinnant authored
implementation of std::is_polymorphic does this: template <class _Tp> struct __is_polymorphic1 : public _Tp {}; ... and that g++ rejects this if _Tp has an inaccessible virtual destructor (because __is_polymorphic1<_Tp> would have a deleted virtual destructor overriding _Tp's non-deleted destructor). Clang was failing to reject this; I've fixed that in r178563, but that causes libc++'s corresponding test case to fail with both clang and gcc when using the fallback implementation. The fallback code also incorrectly rejects final types. The attached patch fixes the fallback implementation of is_polymorphic; we now use dynamic_cast's detection of polymorphic class types rather than trying to determine if adding a virtual function makes the type larger: enable_if<sizeof((_Tp*)dynamic_cast<const volatile void*>(declval<_Tp*>())) != 0, ...> Two things of note here: * the (_Tp*) cast is necessary to work around bugs in Clang and g++ where we otherwise don't instantiate the dynamic_cast (filed as PR15656) * the 'const volatile' is here to treat is_polymorphic<cv T> as true for a polymorphic class type T -- my reading of the standard suggests this is incorrect, but it matches our builtin __is_polymorphic and gcc llvm-svn: 178576
-
Howard Hinnant authored
llvm-svn: 178565
-
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.htmlHoward Hinnant authored
llvm-svn: 178545
-
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.htmlHoward Hinnant authored
llvm-svn: 178544
-
- Mar 29, 2013
-
-
Howard Hinnant authored
llvm-svn: 178370
-
-
Howard Hinnant authored
The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are disabled, so #ifdef'ing out the test. llvm-svn: 178350
-
- Mar 28, 2013
-
-
Howard Hinnant authored
I believe debug mode for vector<T> (T != bool) is complete. If anyone sees anything more they would like to see on it, please let me know. Debug mode is activated by compiling with -D_LIBCPP_DEBUG2=1. Eventually _LIBCPP_DEBUG2 will be renamed to just _LIBCPP_DEBUG. llvm-svn: 178288
-
Howard Hinnant authored
llvm-svn: 178267
-
Howard Hinnant authored
llvm-svn: 178253
-
Howard Hinnant authored
llvm-svn: 178237
-
- Mar 27, 2013
-
-
Daniel Dunbar authored
bootstrap with libc++. llvm-svn: 178116
-
- Mar 26, 2013
-
-
Howard Hinnant authored
Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point. llvm-svn: 178075
-
Howard Hinnant authored
Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576. llvm-svn: 178064
-
Howard Hinnant authored
llvm-svn: 178033
-
Marshall Clow authored
llvm-svn: 178029
-
Howard Hinnant authored
llvm-svn: 178026
-
Howard Hinnant authored
llvm-svn: 178016
-
- Mar 25, 2013
-
-
Howard Hinnant authored
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end(). llvm-svn: 177929
-
Howard Hinnant authored
llvm-svn: 177908
-
Howard Hinnant authored
llvm-svn: 177904
-
Howard Hinnant authored
llvm-svn: 177897
-
Howard Hinnant authored
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0. llvm-svn: 177892
-
- Mar 23, 2013
-
-
Howard Hinnant authored
Marshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution. llvm-svn: 177826
-
Howard Hinnant authored
This is a start at making the libc++ test suite friendlier to the -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously. llvm-svn: 177824
-
- Mar 22, 2013
-
-
Howard Hinnant authored
Test cleanup with respect to use of deprecated tmpnam function. Also Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h llvm-svn: 177755
-
Marshall Clow authored
llvm-svn: 177694
-
Marshall Clow authored
Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator./a.out Found by UBSan llvm-svn: 177693
-
- Mar 20, 2013
-
-
Marshall Clow authored
llvm-svn: 177464
-
- Mar 19, 2013
-
-
Howard Hinnant authored
llvm-svn: 177452
-
Howard Hinnant authored
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences. llvm-svn: 177443
-
Marshall Clow authored
llvm-svn: 177355
-
- Mar 18, 2013
-
-
Marshall Clow authored
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined. llvm-svn: 177310
-
Marshall Clow authored
llvm-svn: 177304
-
Marshall Clow authored
llvm-svn: 177297
-
Marshall Clow authored
llvm-svn: 177291
-
- Mar 16, 2013
-
-
Howard Hinnant authored
This should be nothing but a load-time optimization. I'm trying to reduce load time initializers and this is a big one. No visible functionality change intended. llvm-svn: 177212
-
- Mar 14, 2013
-
-
Marshall Clow authored
llvm-svn: 177099
-
Howard Hinnant authored
llvm-svn: 177093
-