summaryrefslogtreecommitdiffstats
path: root/libcxx/src/strstream.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix or suppress GCC warnings during build.Eric Fiselier2016-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: Currently a number of GCC warnings are emitted when building libc++. This patch fixes or ignores all of them. The primary changes are: * Work around strict aliasing issues in `typeinfo::hash_code()` by using __attribute__((may_alias)). However I think a non-aliasing `hash_code()` implementation is possible. Further investigation needed. * Add `_LIBCPP_UNREACHABLE()` to switch in `strstream.cpp` to avoid -Wpotentially-uninitialized. * Fix -Wunused-value warning in `__all` by adding a void cast. * Ignore -Wattributes for now. There are a number of real attribute issues when using GCC but enabling the warning is too noisy. * Ignore -Wliteral-suffix since it warns about the use of reserved identifiers. Note Only GCC 7.0 supports disabling this warning. * Ignore -Wc++14-compat since it warns about the sized new/delete overloads. Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D24003 llvm-svn: 280007
* [libcxx] Fix a bug in strstreambuf::overflow.Akira Hatanaka2016-06-291-2/+1
| | | | | | | | | | | The end pointer should point to one past the end of the newly allocated buffer. rdar://problem/24265174 Differential Revision: http://reviews.llvm.org/D20334 llvm-svn: 274132
* Fix various undefined behavior found by UBSan.Eric Fiselier2016-06-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | * Fix non-null violation in strstream.cpp Overflow was calling memcpy with a null parameter and a size of 0. * Fix std/atomics/atomics.flag/ tests: a.test_and_set() was reading from an uninitialized atomic, but wasn't using the value. The tests now clear the flag before performing the first test_and_set. This allows UBSAN to test that clear doesn't read an invalid value. * Fix std/experimental/algorithms/alg.random.sample/sample.pass.cpp The tests were dereferencing a past-the-end pointer to an array so that they could do pointer arithmetic with it. Instead of dereference the iterator I changed the tests to use the special 'base()' test iterator method. * Add -fno-sanitize=float-divide-by-zero to suppress division by zero UBSAN diagnostics. The tests that cause float division by zero are explicitly aware that they are doing that. Since this is well defined for IEEE floats suppress the warnings for now. llvm-svn: 273107
* Switch to using C++ style casts.Joerg Sonnenberger2014-01-041-7/+7
| | | | llvm-svn: 198505
* Patch from GM to make more implicit bools explicit since we can't stop MSVC ↵Marshall Clow2013-10-131-4/+4
| | | | | | warning about this in headers and to warn is the MSVC default. No functionality change. llvm-svn: 192548
* Fix signed/unsigned warnings when building libc++ in C++14 modeMarshall Clow2013-08-141-3/+3
| | | | llvm-svn: 188395
* Marshall Clow found this memory problem in strstream using ↵Howard Hinnant2013-03-191-0/+2
| | | | | | -fsanitize=address on the test suite. llvm-svn: 177452
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-4/+4
| | | | llvm-svn: 145624
* Fixing up some ABI issuesHoward Hinnant2011-07-071-35/+0
| | | | llvm-svn: 134639
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-6/+6
| | | | llvm-svn: 134190
* Chris Jefferson noted many places where function calls needed to be ↵Howard Hinnant2011-02-141-2/+2
| | | | | | qualified (thanks Chris). llvm-svn: 125510
* clang found a missing return statement.Howard Hinnant2011-01-271-0/+1
| | | | llvm-svn: 124431
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-041-2/+2
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-221-3/+1
| | | | llvm-svn: 111751
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+363
llvm-svn: 103490
OpenPOWER on IntegriCloud