mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 17:28:30 +08:00
[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 llvm-svn: 363805
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user