[LifetimeSafety] Don't treat assignment to a temporary as a use of its pointee (#240175)
`handleAssignment` stripped the LHS with `IgnoreParenImpCasts()`, which
also skips `MaterializeTemporaryExpr`. For `View{v} = View()`,
`handleAccess()` then saw the prvalue `View{v}` instead of the
materialized temporary, so it checked the loans of the view's value
(`v`'s pointee) instead of the temporary's storage.
```cpp
View v;
{
MyObj s;
v = s;
}
v = View(); // no warning
View{v} = View(); // warning (false positive)
```
[clang-tidy][NFC] Add trailing-comma tests for implicit init lists (#240341)
Adds tests for two `readability-trailing-comma` false positives fixed by
#215934 but not covered by its tests:
- Array-element designators without braces, e.g `.u64[1] = 1`.
- Arguments to a `__transparent_union__` parameter, e.g. glibc's
`bind(fd, &a, len)`, where the fix-it removed the comma between
arguments.
Both scenarios failed with clang-tidy 23.1.0 but pass from 23.1.1 (and
main).
Signed-off-by: Björn Svensson <bjorn.a.svensson at est.tech>
[mlir][scf] refactor loop peeling logic to simplify unsigned and signed handling (#240084)
refactor loop peeling logic to simplify unsigned and signed handling and
add checks for step less than 1
ipsec: fix deprecation error
ErrorException: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in /usr/local/opnsense/mvc/app/controllers/OPNsense/IPsec/Api/KeyPairsController.php:136
(cherry picked from commit e9b69eb72ea37371a2cd3c703dd3e6d36d115ee3)
[mlir][VectorToSCF] Helper for masked Xfer check (NFC) (#240357)
Follow-up to #221307.
Replace the five copies of the "masked by `vector.mask`" check with a
single `checkNotMasked` helper, so the message lives in one place.
In essence, this addresses my nit in #221307.
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
[Offload][test] Fix flaky kernel_crash_async.c (#240343)
The three nowait target regions can launch in any order. Since only the
last one fails, we can only be sure to see its log record. The other
kernels might never run due to the crash.
Claude assisted with this patch.
NAS-142154 / 27.1.0 / Reject new overlaps between Active Directory idmap ranges (by anodos325) (#20162)
The directory services refactor (368cc8cf63) removed the idmap plugin's
range validation and kept only a check between trusted domains. A
trusted domain could then share IDs with the primary domain or BUILTIN.
- Check BUILTIN, the primary domain and enabled trusted domains in
directoryservices.update.
- Leave overlaps already in the saved configuration alone, so that
existing setups can still be disabled, enabled and saved.
Original PR: https://github.com/truenas/middleware/pull/20148
---------
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
[Remarks][NFC] Spell YAML test code points as UTF-8 bytes
\u escapes in narrow string literals use the compiler's execution charset,
so MSVC on Windows encoded U+0085, U+2028 and U+0080 as a single byte or '?'
and TestBlockScalarFallsBackToQuoted failed on Windows bots.
Assisted-by: Claude Code (Claude Sonnet 5.5).
[mlir][ODS] Add DefaultValuedEnumProp
Giving an enum property a default currently means subclassing EnumProp
and spelling the default as `Enum.cppType # "::Case"`, or wrapping it in
DefaultValuedProp with the same hand-written string. DefaultValuedEnumProp
takes the EnumInfo and one of its EnumCase defs, mirroring
DefaultValuedEnumAttr, and asserts at TableGen time that the case belongs
to the enum. The test dialect's default-valued enum props switch to it.
Assisted-by: Claude Code (Claude Fable 5.1).