diff options
author | Stephan T. Lavavej <stl@nuwen.net> | 2024-08-24 09:55:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-24 09:55:17 -0700 |
commit | 886b76128fba5f995c8c8e24aaa2030b59dec01a (patch) | |
tree | 0a68922f035b6e0ba188a29269f1610428ac1651 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 7036394048a963dd23f1a2da269089224e30d0b2 (diff) | |
download | llvm-886b76128fba5f995c8c8e24aaa2030b59dec01a.zip llvm-886b76128fba5f995c8c8e24aaa2030b59dec01a.tar.gz llvm-886b76128fba5f995c8c8e24aaa2030b59dec01a.tar.bz2 |
[libc++][test] Fix `msvc_is_lock_free_macro_value()` (#105876)
Followup to #99570.
* `TEST_COMPILER_MSVC` must be tested for `defined`ness, as it is
everywhere else.
+ Definition:
https://github.com/llvm/llvm-project/blob/52a7116f5c6ada234f47f7794aaf501a3692b997/libcxx/test/support/test_macros.h#L71-L72
+ Example usage:
https://github.com/llvm/llvm-project/blob/52a7116f5c6ada234f47f7794aaf501a3692b997/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp#L248
+ Fixes: `llvm-project\libcxx\test\support\atomic_helpers.h(33): fatal
error C1017: invalid integer constant expression`
* Fix bogus return type: `msvc_is_lock_free_macro_value()` returns `2`
or `0`, so it needs to return `int`.
+ Fixes: `llvm-project\libcxx\test\support\atomic_helpers.h(41): warning
C4305: 'return': truncation from 'int' to 'bool'`
* Clarity improvement: also add parens when mixing bitwise with
arithmetic operators.
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions