diff options
author | Max Moroz <mmoroz@chromium.org> | 2019-06-19 14:14:27 +0000 |
---|---|---|
committer | Max Moroz <mmoroz@chromium.org> | 2019-06-19 14:14:27 +0000 |
commit | 0b7f4ad0c09b9a861d17f4b4cc10b561809a5fd3 (patch) | |
tree | 9f3056c820b082e39e5a268c75a93ae75adee1cc /lib/fuzzer/utils/FuzzedDataProvider.h | |
parent | 8be6b779912a1d83a6917cf7349b12c6f07feed1 (diff) | |
download | compiler-rt-0b7f4ad0c09b9a861d17f4b4cc10b561809a5fd3.tar.gz |
[libFuzzer] Remove too aggressive static_assert in FuzzedDataProvider.
Summary:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/31
error: static_assert failed due to requirement
'std::numeric_limits<char>::is_signed' "Destination type must be
signed."
static_assert(std::numeric_limits<TS>::is_signed,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildslave/buildslave/clang-cmake-aarch64-full/llvm/projects/compiler-rt/lib/fuzzer/utils/FuzzedDataProvider.h:126:19:
note: in instantiation of function template specialization
'FuzzedDataProvider::ConvertUnsignedToSigned<char, unsigned char>'
requested here
char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);
^
1 error generated.
Reviewers: Dor1s
Reviewed By: Dor1s
Subscribers: javed.absar, kristof.beyls, delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D63553
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@363805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/utils/FuzzedDataProvider.h')
-rw-r--r-- | lib/fuzzer/utils/FuzzedDataProvider.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/fuzzer/utils/FuzzedDataProvider.h b/lib/fuzzer/utils/FuzzedDataProvider.h index 2b9171af9..1b5b4bb01 100644 --- a/lib/fuzzer/utils/FuzzedDataProvider.h +++ b/lib/fuzzer/utils/FuzzedDataProvider.h @@ -223,8 +223,6 @@ private: static_assert(sizeof(TS) == sizeof(TU), "Incompatible data types."); static_assert(!std::numeric_limits<TU>::is_signed, "Source type must be unsigned."); - static_assert(std::numeric_limits<TS>::is_signed, - "Destination type must be signed."); // TODO(Dor1s): change to `if constexpr` once C++17 becomes mainstream. if (std::numeric_limits<TS>::is_modulo) |