Commit Graph

61 Commits

Author SHA1 Message Date
Stephan T. Lavavej
a686caad20 [libcxx] [test] Untabify, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309464 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 00:55:10 +00:00
Stephan T. Lavavej
62e519c2f9 [libcxx] [test] Strip trailing whitespace, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309463 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 00:54:49 +00:00
Stephan T. Lavavej
3c00cff599 [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.
Fix D34536.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@308534 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19 22:02:29 +00:00
Marshall Clow
3477ae445a Implement inclusive_scan/transform_inclusive_scan for C++17.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@306083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-23 05:12:42 +00:00
Stephan T. Lavavej
b836deb5db [libcxx] [test] Strip trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-20 21:00:02 +00:00
Marshall Clow
270a04fb06 Renamed some of the newly added tests. No functional change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305453 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15 05:44:49 +00:00
Marshall Clow
0175dfdfdf Implement the non-parallel versions of reduce and transform_reduce for C++17
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305365 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-14 04:48:45 +00:00
Marshall Clow
6bb9569124 Add a test with an empty input range - should do nothing
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305268 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-13 02:28:40 +00:00
Marshall Clow
fb97c4408f Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan. Reviewed as https://reviews.llvm.org/D34038.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305136 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-10 02:22:13 +00:00
Billy Robert O'Neal III
3f9bc2d28c Resolve integer overflow warnings in GCD and LCM tests
lcm.pass.cpp:
19: Update headers to that actually used in the test.
41: test0 was triggering narrowing warnings for all callers, because the
inputs were always ints, but some of the explicit template arguments were
smaller than that. Instead, have this function accept ints and static_cast
explicitly to the types we want before calling std::lcm.
47: Replace unnecessary ternary.
55: Use foo_t instead of typename foo<>::type
111/116: intX_t were not std::qualified but only <cfoo> headers were included.
141: C1XX has a bug where it interprets 2147483648 as unsigned int. Then the
negation trips "negation of unsigned value, result still unsigned" warnings.
Perma-workaround this issue by saying INT_MIN, which better documents the
intended behavior and avoids triggering warnings on C1XX.

gcd.pass.cpp:
Same changes as lcm.pass.cpp but for GCD.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302472 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 21:52:05 +00:00
Eric Fiselier
b3b66a4d81 Document XFAIL's with the relevent bug number
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302213 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 05:19:21 +00:00
Mehdi Amini
907c1196a7 Add markup for libc++ dylib availability
Libc++ is used as a system library on macOS and iOS (amongst others). In order
for users to be able to compile a binary that is intended to be deployed to an
older version of the platform, clang provides the
availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_
that can be placed on declarations to describe the lifecycle of a symbol in the
library.

See docs/DesignDocs/AvailabilityMarkup.rst for more information.

Differential Revision: https://reviews.llvm.org/D31739

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 17:08:54 +00:00
Duncan P. N. Exon Smith
5df171df50 cmath: Skip Libc for integral types in isinf, etc.
For std::isinf, the standard requires effectively calling isinf as
double from Libc for integral types. But integral types are never
infinite; we don't need to call Libc to return false.

Also short-circuit other functions where Libc won't have interesting
answers: signbit, fpclassify, isfinite, isnan, and isnormal.

I added correctness tests for integral types since we're no longer
deferring to Libc.

In review it was pointed out that in future revisions of the C++
standard we may add more types to std::is_arithmetic (e.g.,
std::is_fixed_point).  I'll leave it to a future commit to hack this to
allow using math functions on those.  We'll need to change things like
__libcpp_fpclassify anyway, so I'm not sure anything here would really
be future-proof.

https://reviews.llvm.org/D31561
rdar://problem/31361223

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@301060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 23:14:55 +00:00
Eric Fiselier
97db517a49 Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300632 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 00:23:45 +00:00
Eric Fiselier
f4dfb45247 Clean up more usages of _LIBCPP_HAS_NO_RVALUE_REFERENCES
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296854 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-03 03:43:25 +00:00
Marshall Clow
ebf66a385f Make lcm/gcd work better in edge cases. Fixes a UBSAN failure.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294779 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 20:49:08 +00:00
Marshall Clow
1b8fc14abc Temporarily disable the LCM/GCD tests under UBSAN.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294417 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-08 07:40:59 +00:00
Marshall Clow
24597f254d Add some tests to verify that we implement LWG#2837 correctly. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294194 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-06 16:03:23 +00:00
Stephan T. Lavavej
939607910d [libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.
These typedefs were completely unused.

Fixes D29136.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294155 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:47:41 +00:00
Eric Fiselier
0e5ebbc77c Fix unused parameters and variables
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:37:52 +00:00
Eric Fiselier
a2cd270943 Enable the -Wsign-compare warning to better support MSVC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-11 05:31:00 +00:00
Stephan T. Lavavej
3e541a6172 [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 7/7.
test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp
Add static_cast<char> because basic_istream::get() returns int_type (N4606 27.7.2.3 [istream.unformatted]/4).

test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
Add static_cast<char> because toupper() returns int (C11 7.4.2.2/1).

test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp
This test is intentionally writing doubles to ostream_iterator<int>.
It's silencing -Wliteral-conversion for Clang, so I'm adding C4244 silencing for MSVC.

test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
Given `extern float zero;`, the expression `1./zero` has type double, which emits a truncation warning
when being passed to test<float>() taking float. The fix is to say `1.f/zero` which has type float.

test/std/numerics/complex.number/cmplx.over/arg.pass.cpp
test/std/numerics/complex.number/cmplx.over/norm.pass.cpp
These tests were constructing std::complex<double>(x, 0), emitting truncation warnings when x is long long.
Saying static_cast<double>(x) avoids this.

test/std/numerics/rand/rand.eng/rand.eng.lcong/seed_result_type.pass.cpp
This was using `int s` to construct and seed a linear_congruential_engine<T, stuff>, where T is
unsigned short/unsigned int/unsigned long/unsigned long long. That emits a truncation warning in the
unsigned short case. Because the range [0, 20) is tiny and we aren't doing anything else with the index,
we can just iterate with `T s`.

test/std/re/re.traits/value.pass.cpp
regex_traits<wchar_t>::value()'s first parameter is wchar_t (N4606 28.7 [re.traits]/13). This loop is
using int to iterate through ['g', 0xFFFF), emitting a truncation warning from int to wchar_t
(which is 16-bit for some of us). Because the bound is exclusive, we can just iterate with wchar_t.

test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
This test is a little strange. It's trying to verify that basic_string's (InIt, InIt) range constructor
isn't confused by "N copies of C" when N and C have the same integral type. To do this, it was
testing (100, 65), but that eventually emits truncation warnings from int to char. There's a simple way
to avoid this - passing (static_cast<char>(100), static_cast<char>(65)) also exercises the disambiguation.
(And 100 is representable even when char has a signed range.)

test/std/strings/string.view/string.view.hash/string_view.pass.cpp
Add static_cast<char_type> because `'0' + i` has type int.

test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp
What's more horrible than nested bind()? pow() overloads! This operator()(T a, T b) was assuming that
std::pow(a, b) can be returned as T. (In this case, T is int.) However, N4606 26.9.1 [cmath.syn]/2
says that pow(int, int) returns double, so this was truncating double to int.
Adding static_cast<T> silences this.

test/std/utilities/function.objects/unord.hash/integral.pass.cpp
This was iterating `for (int i = 0; i <= 5; ++i)` and constructing `T t(i);` but that's truncating
when T is short. (And super truncating when T is bool.) Adding static_cast<T> silences this.

test/std/utilities/utility/exchange/exchange.pass.cpp
First, this was exchanging 67.2 into an int, but that's inherently truncating.
Changing this to static_cast<short>(67) avoids the truncation while preserving the
"what if T and U are different" test coverage.
Second, this was exchanging {} with the explicit type float into an int, and that's also
inherently truncating. Specifying short is just as good.

test/std/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp
Add static_cast<short>. Note that this affects template argument deduction for make_pair(),
better fulfilling the test's intent. For example, this was saying
`typedef std::pair<int, short> P1; P1 p1 = std::make_pair(3, 4);` but that was asking
make_pair() to return pair<int, int>, which was then being converted to pair<int, short>.
(pair's converting constructors are tested elsewhere.)
Now, std::make_pair(3, static_cast<short>(4)) actually returns pair<int, short>.
(There's still a conversion from pair<nullptr_t, short> to pair<unique_ptr<int>, short>.)

Fixes D27544.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 21:38:57 +00:00
Stephan T. Lavavej
21208822a8 [libcxx] [test] D27022: Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12.
Add static_cast<std::size_t> to more comparisons. (Performed manually, unlike part 8/12.)

Also, include <cstddef> when it wasn't already being included.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288746 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 01:13:14 +00:00
Stephan T. Lavavej
e33c0b01f8 [libcxx] [test] D27027: Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287829 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:03:28 +00:00
Stephan T. Lavavej
50fe47bc8b [libcxx] [test] D27020: Fix MSVC warning C4245 "conversion from 'X' to 'Y', signed/unsigned mismatch", part 7/12.
When initializing unsigned integers to their maximum values, change "const T M(~0);" to "const T M(static_cast<T>(-1));".

~0 and -1 are equivalent, but I consider the -1 form to be significantly clearer (and more consistent with other tests).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287827 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:02:53 +00:00
Stephan T. Lavavej
bdf8bae8bb [libcxx] [test] D27018: Fix MSVC warning C4018 "signed/unsigned mismatch", part 5/12.
Various changes:

test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp
Change M from unsigned to int. It's compared against "int x",
and we binary_search() for it within a vector<int>.

test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp
test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp
Add static_cast<unsigned> when comparing int to unsigned.

test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
Change unsigned indices to int when we're being given int as a bound.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:02:35 +00:00
Stephan T. Lavavej
a9bcd3dae8 [libcxx] [test] D27013: Fix MSVC warning C4018 "signed/unsigned mismatch", part 1/12.
Change loop indices from int to std::size_t.

Also, include <cstddef> when it wasn't already being included.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:01:19 +00:00
Stephan T. Lavavej
2917004aed [libcxx] [test] D26812: In random tests, use real static_asserts and silence a warning.
In C++11 mode and newer, use real static_asserts.
In C++03 mode, min() and max() aren't constexpr, so use plain asserts.

One test triggers MSVC's warning C4310 "cast truncates constant value".
The code is valid, and yet the warning is valid, so I'm silencing it
through push-disable-pop.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 22:45:32 +00:00
Marshall Clow
db7fa111ab Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted last week in Issaquah
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 18:22:19 +00:00
Stephan T. Lavavej
45e692539c [libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is initialized but not referenced".
test/std/depr/depr.c.headers/inttypes_h.pass.cpp
test/std/input.output/file.streams/c.files/cinttypes.pass.cpp
test/std/input.output/iostream.forward/iosfwd.pass.cpp
Add test() to avoid a bunch of void-casts, although we still need a few.

test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp
skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below).

test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp
test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp
test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp
test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp
test/std/localization/locales/locale.global.templates/use_facet.pass.cpp
When retrieving facets, the references are unused.

test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp
test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp
"std::ios_base::iostate err = ios.goodbit;" was completely unused here.

test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp
test/std/numerics/c.math/ctgmath.pass.cpp
test/std/numerics/rand/rand.device/entropy.pass.cpp
test/std/numerics/rand/rand.device/eval.pass.cpp
test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp
test/std/thread/futures/futures.promise/dtor.pass.cpp
test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp
These variables are verifying types but are otherwise unused.

test/std/strings/basic.string/string.capacity/reserve.pass.cpp
old_cap was unused (it's unclear to me whether it was intended to be used).

test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp
These tests contained unused characters.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 17:35:14 +00:00
Stephan T. Lavavej
e619862dbf [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.
This replaces every occurrence of _LIBCPP_STD_VER in the tests with
TEST_STD_VER. Additionally, for every affected
file, #include "test_macros.h" is being added explicitly if it wasn't
already there.

https://reviews.llvm.org/D26294

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-04 20:26:59 +00:00
Roger Ferrer Ibanez
6168a5e55f Protect tests that expect an exception for an unknown std::random_device
Skip these tests under libcpp-no-exceptions.

Differential Revision: https://reviews.llvm.org/D26141



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-01 08:11:12 +00:00
Eric Fiselier
a7b77ebd18 Remove usages of _LIBCPP_CONSTEXPR under test/std
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 10:28:09 +00:00
Eric Fiselier
cedbdd7fee Remove all _LIBCPP_VERSION tests from under test/std
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-08 01:32:56 +00:00
Marshall Clow
d6e36bb773 Remove test for the sign of a NaN - doesn't work on MIPS, not strictly legal. Fixes bug 28936
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@278387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-11 18:46:24 +00:00
Marshall Clow
1c1e91d9a3 Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276751 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 14:29:45 +00:00
Eric Fiselier
aafdbda646 Fix portability issues in <random> tests. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276585 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-24 23:36:18 +00:00
Eric Fiselier
781fb2a738 Add SFINAE on additional overloads of std::complex functions. Fixes PR19921.
The functions arg, conj, imag, norm, proj, and real have additional overloads
for arguments of integral or floating point types. However these overloads should
not allow conversions to the integral/floating point types, only exact matches.

This patch constrains these functions so they no longer allow conversions.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-20 00:14:10 +00:00
Eric Fiselier
256f000cdc Add array bounds assertions to satisfy MSVC's /analyze flag. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26 19:48:29 +00:00
Eric Fiselier
22bff1afcc Move remaining _LIBCPP_VERSION tests into test/libcxx
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 02:23:22 +00:00
Eric Fiselier
14fe08bcb7 Avoid huge main() functions and huge arrays. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:13:44 +00:00
Eric Fiselier
dc45b08815 Fix operator precedence mistake in valarray/not.pass.cpp. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-22 01:04:09 +00:00
Eric Fiselier
42e3e187f5 Improve portability of random_device tests. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272746 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 01:50:31 +00:00
Eric Fiselier
d24c465bea Replace __cplusplus comparisons and dialect __has_feature checks with TEST_STD_VER.
This is a huge cleanup that helps make the libc++ test suite more portable.
Patch from STL@microsoft.com. Thanks STL!


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272716 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 21:31:42 +00:00
Eric Fiselier
d6c0cf0ebd Rename variables to prevent shadowing. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272619 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 02:51:13 +00:00
Marshall Clow
fb59f5ce4d Rename some test data (and make it const) to rid us of some shadowing warnings in the test suite. No functional change. Thanks to STL@microsoft for the report and patch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 18:24:08 +00:00
Eric Fiselier
84acb1ec3f Remove trailing whitespace in test suite. Approved by Marshall Clow.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 21:35:39 +00:00
Asiri Rathnayake
a3eac518e6 [libcxx] Improve tests to use the UNSUPPORTED lit directive
Quite a few libcxx tests seem to follow the format:
 #if _LIBCPP_STD_VER > X
   // Do test.
 #else
   // Empty test.
 #endif
We should instead use the UNSUPPORTED lit directive to exclude the test on
earlier C++ standards. This gives us a more accurate number of test passes
for those standards and avoids unnecessary conflicts with other lit
directives on the same tests.

Reviewers: bcraig, ericwf, mclow.lists

Differential revision: http://reviews.llvm.org/D20730

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 08:57:35 +00:00
Eric Fiselier
7515c69b11 Tolerate incorrect return type for 'isinf' and 'isnan' in tests.
Summary:
GLIBC recently removed the incorrect `int isinf(double)` and `int isnan(double)` overloads in C++11 and greater. This causes previously `XFAIL: linux`  tests to start passing.

Since there is no longer a way to 'XFAIL' the tests I choose to simply tolerate this bug.

See https://sourceware.org/bugzilla/show_bug.cgi?id=19439


Reviewers: rsmith, mclow.lists, EricWF

Subscribers: jroelofs, cfe-commits

Differential Revision: http://reviews.llvm.org/D19835

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 22:19:53 +00:00
Marshall Clow
2c15439dd3 Implement P0030R1: Introduce a 3-Argument Overload to std::hypot
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@269772 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 14:52:19 +00:00