aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorStephan T. Lavavej <stl@nuwen.net>2024-05-28 12:17:57 -0700
committerGitHub <noreply@github.com>2024-05-28 12:17:57 -0700
commit266fac8375bdf3f039503c559bb16ffab8895ae5 (patch)
treebd774fc8a45d23892b862fc048eca9279105c0e8 /llvm/lib/Object/WasmObjectFile.cpp
parent51752ed0dd737f12014a89dec67d25494083153d (diff)
downloadllvm-266fac8375bdf3f039503c559bb16ffab8895ae5.zip
llvm-266fac8375bdf3f039503c559bb16ffab8895ae5.tar.gz
llvm-266fac8375bdf3f039503c559bb16ffab8895ae5.tar.bz2
[libc++] [test] Fix MSVC warnings (#93257)
Found while running libc++'s tests with MSVC's STL. * Avoid MSVC warning C5101: use of preprocessor directive in function-like macro argument list is undefined behavior. + We can easily make this portable by extracting `const bool is_newlib`. + Followup to #73440. + See #73598. + See #73836. * Avoid MSVC warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data. + This warning is valid, but harmless for the test, so `static_cast<int>` will avoid it. * Avoid MSVC warning C4146: unary minus operator applied to unsigned type, result still unsigned. + This warning is also valid (the scenario is sometimes intentional, but surprising enough that it's worth warning about). This is a C++17 test, so we can easily avoid it by testing `is_signed_v` at compile-time before testing `m < 0` and `n < 0` at run-time. * Silence MSVC warning C4310: cast truncates constant value. + These warnings are being emitted by `T(255)`. Disabling the warning is simpler than attempting to restructure the code. + Followup to #79791. * MSVC no longer emits warning C4521: multiple copy constructors specified. + This warning was removed from the compiler, since at least 2021-12-09.
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions