[libc++][iterator] Applied `[[nodiscard]]` (#172200)
`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
- https://libcxx.llvm.org/CodingGuidelines.htm
- https://wg21.link/iterators
Also moves the test to the correct location:
`libcxx/test/libcxx/iterators/nodiscard.verify.cpp`
Towards #172124
---------
Co-authored-by: Hristo Hristov <zingam at outlook.com>
vfs_domount(): handle the case when vn_lock_pair() only locked once
Reviewed by: jah, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57035
vn_lock_pair(): handle the case of vp1->v_vnlock == vp2->v_vnlock
It is not enough to check vp1 == vp2 to detect lock recursion, since
vnodes might share the locks. This might happen for e.g. stacked
filesystems (nullfs and other), and for FFS snapshots.
Switch from checking vnode equiality to check v_vnlock equiality, and
recheck the condition after vnode relock since reclamation or otner
parallel operation might change the vnode locks under us.
Return a value (not really an error) indicating the case that vnodes
share the lock, to simplify the unlock in caller.
Reviewed by: jah, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57035
[OpenMP][mlir] Support iterator modifier LLVM lowering for map/motion
Lower iterator modifiers on map and motion
(target_data/target_data_begin/target_data_end/target_update) by
building dynamic offload map arrays in OpenMPIRBuilder and populating
them from iterator-expanded map entries during MLIR OpenMP to LLVM IR
translation.
Hoist runtime-sized offload map array allocation for target data with
iterator modifiers so the dynamic count and arrays dominate runtime calls.
This patch is part of feature work for #188061.
Assisted with copilot.
[clang-format] Fix unrecognized qualifiers breaking east-const (#198656)
Long time reader, first time contributor. :3
I've been experimenting with `_Nullable` and `_Nonnull` qualifiers in my
project for which the `.clang-format` configures:
```
QualifierAlignment: Custom
QualifierOrder: [type, const, volatile]
```
This results in the following form:
```cpp
T const* _Nullable const identifier =
```
Formatting as:
```cpp
T const* _Nullable identifier const =
```
[10 lines not shown]
[flang] Implement lowering for BOZ literal arguments in BGE, BLE, BGT, BLT (#191874)
BGE/BGT/BLE/BLT allow one or both arguments to be a BOZ literal
constant. Unlike other intrinsics that accept BOZ arguments, these do
not convert the BOZ to a typed value during semantic analysis.
When both arguments are constants, the comparison is folded at compile
time in `fold-logical.cpp`. However, when the non-BOZ argument is a
variable, folding is skipped and the BOZ literal constant persists in
the expression tree through to lowering.
The lowering implementation wraps the `BOZLiteralConstant]` in a
`Constant<LargestInt>` and feeds it through the existing
`convertConstant` infrastructure. Since BOZ is always a scalar, this
always produces a trivial SSA value. This follows the same pattern as
`gen(Constant<T>)` for the trivial scalar path. The `AddrOfOp` branch
from that template is intentionally omitted because a scalar i128
constant never produces a global reference. The
`outlineBigConstantInReadOnlyMemory` parameter is set to false to make
[10 lines not shown]
mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit
MFC after: 1 minute
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 21df76d01fce35b0398cf38c31928c6f47111d55)
[Flang][OpenMP] Support iterator modifiers in map and motion clauses
Support iterated array elements and array sections in map and motion clauses for
target data, target enter data, target exit data, and target update constructs.
Preserve mapper resolution for iterated entries, including explicit mappers,
user-defined default mappers, declare mapper entries, and implicit default
mappers.
This PR stacked on top of #197047 and #197752.
This patch is part of the feature work for #188061.
Assisted with copilot.
[HLSL][SPIRV] Correct reversebit 64 split (#197849)
Replace the split-lanes + OpCompositeConstruct sequence in
selectBitreverse64 with a single OpVectorShuffle to swap the high/low
32-bit halves, simplifying both the selector logic, the emitted SPIR-V
and fixing the bug.
fix: #197810
Assisted by: Claude Opus 4.6