diff options
Diffstat (limited to 'test/libcxx/utilities')
4 files changed, 46 insertions, 5 deletions
diff --git a/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h b/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h index 7e7a5fd24..f2a5b08da 100644 --- a/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h +++ b/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h @@ -129,7 +129,7 @@ private: }; //============================================================================== -// DerivedFromBase - A type that derives from it's template argument 'Base' +// DerivedFromBase - A type that derives from its template argument 'Base' template <class Base> struct DerivedFromType : public Base { DerivedFromType() : Base() {} @@ -138,7 +138,7 @@ struct DerivedFromType : public Base { }; //============================================================================== -// DerefToType - A type that dereferences to it's template argument 'To'. +// DerefToType - A type that dereferences to its template argument 'To'. // The cv-ref qualifiers of the 'DerefToType' object do not propagate // to the resulting 'To' object. template <class To> @@ -154,7 +154,7 @@ struct DerefToType { }; //============================================================================== -// DerefPropToType - A type that dereferences to it's template argument 'To'. +// DerefPropToType - A type that dereferences to its template argument 'To'. // The cv-ref qualifiers of the 'DerefPropToType' object propagate // to the resulting 'To' object. template <class To> diff --git a/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp b/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp new file mode 100644 index 000000000..319a78b05 --- /dev/null +++ b/test/libcxx/utilities/function.objects/unord.hash/murmur2_or_cityhash_ubsan_unsigned_overflow_ignored.pass.cpp @@ -0,0 +1,41 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// Test that UBSAN doesn't generate unsigned integer overflow diagnostics +// from within the hashing internals. + +#include <utility> +#include <cstdint> +#include <limits> +#include <string> + +#include "test_macros.h" + +typedef std::__murmur2_or_cityhash<uint32_t> Hash32; +typedef std::__murmur2_or_cityhash<uint64_t> Hash64; + +void test(const void* key, int len) { + for (int i=1; i <= len; ++i) { + Hash32 h1; + Hash64 h2; + DoNotOptimize(h1(key, i)); + DoNotOptimize(h2(key, i)); + } +} + +int main() { + const std::string TestCases[] = { + "abcdaoeuaoeclaoeoaeuaoeuaousaotehu]+}sthoasuthaoesutahoesutaohesutaoeusaoetuhasoetuhaoseutaoseuthaoesutaohes" + "00000000000000000000000000000000000000000000000000000000000000000000000", + "1237546895+54+4554985416849484213464984765465464654564565645645646546456546546" + }; + const size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]); + for (size_t i=0; i < NumCases; ++i) + test(TestCases[i].data(), TestCases[i].length()); +} diff --git a/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp index cb17dfeb0..26556c6eb 100644 --- a/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp +++ b/test/libcxx/utilities/variant/variant.variant/variant.assign/copy.pass.cpp @@ -12,7 +12,7 @@ // The following compilers don't generate constexpr special members correctly. // XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8 -// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8 +// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0 // <variant> diff --git a/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp index 286a62388..fb6907dc5 100644 --- a/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp +++ b/test/libcxx/utilities/variant/variant.variant/variant.assign/move.pass.cpp @@ -12,7 +12,7 @@ // The following compilers don't generate constexpr special members correctly. // XFAIL: clang-3.5, clang-3.6, clang-3.7, clang-3.8 -// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8 +// XFAIL: apple-clang-6, apple-clang-7, apple-clang-8.0 // <variant> |