[clangd] DefineInline: only trigger on the declaration that has the body (#227534)
The "Move function body to declaration" tweak (DefineInline) is offered on a redeclaration that follows the definition, and then fails when applied.
### Reproduction
```
printf 'void h(void) {}\nvoid h(void);\n' > /tmp/p3.c
clangd --check=/tmp/p3.c 2>&1 | grep -E 'DefineInline|All checks'
```
Before (also reproduces with clangd 17.0.6 and 19.1.7):
```
tweak: DefineInline ==> FAIL: Couldn't find semicolon for target declaration.
All checks completed, 1 errors
```
After:
[20 lines not shown]
mips: Avoid shifting into sign bit by using unsigned type instead.
Maybe this loop should do arithmetic in the other direction? But at
least left shifts on unsigned t-bit types are reduced mod 2^t and not
undefined, so this is a simpler change to avoid UB.
PR port-evbmips/60812: UBSan: Undefined Behavior in [sys-src] member
access within misaligned address [..] for type '[..]' which requires
128 byte alignment
[Matrix] Implement matrix support for the `select` intrinsic (#227753)
Closes #184487.
This PR implements the matrix api for `select`, adds matrix codegen
tests, matrix sema tests, and SPIRV matrix backend tests. DirectX matrix
backend tests were not added because no DirectX backend changes were
made.
Assisted-by: Claude Opus 4.8
[Matrix] Implement matrix support for the `select` intrinsic (#227753)
Closes #184487.
This PR implements the matrix api for `select`, adds matrix codegen
tests, matrix sema tests, and SPIRV matrix backend tests. DirectX matrix
backend tests were not added because no DirectX backend changes were
made.
Assisted-by: Claude Opus 4.8
Add NTS support for NTP servers
NTP servers can now be authenticated with Network Time Security (RFC 8915)
using chrony's per-source `nts` option.
- system.ntpserver gains `nts`. Saving an NTS server without `force` runs
NTS key establishment (TLS 1.3, ALPN ntske/1, system trust store; see
middlewared.utils.ntp) and then checks the NTP server and port it
negotiates. maxpoll is capped at 21 with NTS so that chrony's key refresh
interval stays longer than the poll interval.
- chrony.conf renders `authselectmode prefer`: while any NTS server is
configured, servers without NTS (including DHCP-provided ones) are not used.
- system.security gains `require_nts` (off by default), which renders
`authselectmode require`. It can only be enabled with an NTS server
configured. While it is set, servers without NTS are refused and the last
NTS server cannot be deleted. Changing it restarts chronyd on both
controllers.
- The database migration adds time.cloudflare.com and ntppool1.time.nl with
NTS to systems still on exactly the TrueNAS default NTP servers that are
[16 lines not shown]
[mlir][LLVM] Use a disjoint scope domain when inlining noalias
This matches recent changes to the LLVM inliner.
AI disclosure: Claude wrote the code, I wrote the commit message and
have done initial review.
[mlir][LLVM] Add disjointScopes to AliasScopeDomainAttr
This also updates the MLIR-side inliner to clone disjoint domains
while cloning alias scopes, matching changes to LLVM.
AI disclosure: Claude wrote the code, I wrote the commit message and
looked at the code.
[AMDGPU] Use a disjoint scope domain for merged LDS structs
When lowering LDS values, all the values are mutually disjoint, so we
can use the newly-added disjoint scopes feature to simplify the IR.
AI disclosure: Claude wrote this and I reviewed it and wrote the
commit message
[AMDGPU] Use a disjoint scope domain for noalias kernel arguments
All noalias arguments of a kernel are disjoint with each other, so we
can use a disjoint scope to save on metadata construction.
AI disclosure: Claude wrote this, I looked at it and wrote this
message.
[Inliner] Use a disjoint scope domain for noalias arguments
InlineFunction creates alias.scope/noalias metadata to represent the
set of `noalias` arguments to a function. We don't need the `!noalias`
now that we have the ability to use disjoint scopes, saving us IR size
and metadata bloat.
TODO move these to a previous commit.
Also changes InstCombine to not drop the experimental.noalias.scope.decl
for disjoint scopes even if they're not mentioned in a `!noalias`, but
do still delete them if they're not used.
[IR] Add alias scope domains with disjoint scopes
See RFC at
https://discourse.llvm.org/t/rfc-disjoint-scope-alias-scope-noalias-domains/91537
This commit adds support for declaring an alias scope domain disjoint.
Disjoint domains are ones where each scope is implicitly `!noalias`
with each other scope in the domain. This is represented by adding an
`i1` into the scope's domain as the second argument, with `i1 true`
representing disjoint scopes and `i1 false` representing the old
non-disjoint behavior. AutoUpgrade mechanisms have been added to add
in the missing `i1 false` to existing metadata.
This commit updates alias analysis to know about disjoint scopes and
updates the function cloner to also clone the alias domain if it's
disjoint (since, as a herd of LLMs discovered, you don't want the old
IR to be noalias with a clone of itself).
Commits to migrate passes to use disjoint scopes where that's an
[4 lines not shown]
[CUDA] [Headers] Mark getters for `threadIdx` etc. as `const` (#228166)
The LLVM builtins these lower to are already effectively treated as
such, so this shouldn't cause any correctness issues. Adding this
attribute enables assumptions on these builtins; previously, such
assumptions would be discarded as Clang by default treats function calls
as having side-effects.
This patch also adds some optimiser tests to ensure assumptions
involving these builtins actually improve the resulting IR.
Tests were generated by Codex.
Fixes https://github.com/llvm/llvm-project/issues/181340.