[Clang][C2y] Make the 'if' declaration extension warning on by default
Declarations in the condition of 'if' and 'switch' statements (N3356)
were previously only diagnosed in pre-C2y modes under -pedantic, since
the C compatibility warnings default to Extension. Promote the
diagnostic to an ExtWarn so users on older language modes are told
they are relying on a C2y extension; -Wno-c2y-extensions silences it.
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
[Clang][C2y] Simplify condition-declaration diagnostics in C
Key the diagnostics on whether a declaration is permitted as the
condition (only as the sole clause of an 'if' or 'switch'), so the two
"expected expression" emissions collapse into one and the first-clause
check is no longer nested inside the branching. No functional change.
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
[flang-rt] Fix CopyOutAssign unit tests on Darwin (#233999)
The flang-rt unittests are built with -D_POSIX_C_SOURCE=200809 on
Darwin, which hides MAP_ANON/MAP_ANONYMOUS in <sys/mman.h>.
This made AllocateAnonymousPages() fall back to mapping /dev/zero,
which Darwin doesn't support (mmap fails with ENODEV), causing the
CopyOutAssign tests that use it to fail.
Define _DARWIN_C_SOURCE before including system headers, as
trampoline.cpp already does, to re-expose the anonymous mapping flags.
Assisted-by: Claude Opus 5.5
[clang][bytecode] Lazily run ctor func of local blocks (#233250)
The problem with the attached test case is that a conditional operator
will force initialize the current variable scope, so we know that the
scope is initialized in both arms of the conditional operator. However,
this causes problems if the conditional operator (and thus its force
initialization of the scope) is itself not always executed, e.g. if
preceded by `0 &&`. In that case , the binary operator will skip the
RHS.
Remove the `InitScope` op altogether and simply call
`Block::invokeCtor()` when accessing a local variable for the first
time. This way, we automatically run the ctor, even if the `InitScope`
wasn't reached (if it still existed anyway).
This also allows us to remove a similar workaround from `Pointer.cpp`.
Fixes https://github.com/llvm/llvm-project/issues/232854
[mlir][LLVM] Add LLVMStructType::getElementOffset()
Since bb6f7fcb46cd LLVMStructType::getTypeSizeInBits() uses
allocation sizes, but there are a few places where we still
compute field offsets based on store sizes.
This change factors out the computations into a single method,
a counterpart of LLVM's StructLayout::getElementOffset(), so
that all now agree in how they do that.
Also simplify the surrounding code a bit while there.
x11/cosmic-bg: New port: COSMIC service to apply wallpapers to displays
`cosmic-bg` is a layer shell protocol implementation to
handle wallpapers for the COSMIC desktop environment. It supports
common image formats, using gradients or solid colors, per-display
backgrounds, and slideshows.
WWW: https://github.com/pop-os/cosmic-bg
PR: 299662
Reported by: Josh Megnauth <jo.sh at tutanota.com> (new maintainer)
x11/cosmic-bg: New port: COSMIC service to apply wallpapers to displays
`cosmic-bg` is a layer shell protocol implementation to
handle wallpapers for the COSMIC desktop environment. It supports
common image formats, using gradients or solid colors, per-display
backgrounds, and slideshows.
WWW: https://github.com/pop-os/cosmic-bg
PR: 299662
Reported by: Josh Megnauth <jo.sh at tutanota.com> (new maintainer)
[Triple] Simplify ELFv2 ABI and Secure PLT handling for FreeBSD (#233047)
FreeBSD 13 is the baseline supported version and it uses the
ELFv2 ABI on big-endian powerpc64 and Secure PLT on 32-bit
powerpc, so drop the OS version checks and treat all FreeBSD
targets as using them.
[Clang] Use getNonTypeTemplateArgumentType fallback in getTypeOfConstantTemplateParameter (#231983)
Follow-up to c169131b760c (#231599).
Arg.getNonTypeTemplateArgumentType() in
Sema::getTypeOfConstantTemplateParameter when Arg does not name a
constant template parameter, and remove the unnecessary T.isNull() check
in isUndeducedAuto.
Firewall: Rules - fix query performance issue caused by earlier commit (#11061)
* Firewall: Rules - fix query performance issue caused by https://github.com/opnsense/core/commit/18533b4c60c27253f8c2ebbdfd9bc11d6450da1d
Always showing automatic rules has quite some performance impact, since we need to initialize the plugin system, we can't really speedup that part of the process.
This commit changes the view to show the currently active rules instead of calculating how it would look like after apply, in order to reach that state, we flush the non-mvc rules to /tmp/rules_internal.json which the list_non_mvc_rules.php can use to render the automatic (and legacy) rules quickly.
* Firewall: Rules - minor change in previous, move writing metadata to after successful apply
* pass origin into two other spots, remove cache_ttl as the work has already been done
---------
Co-authored-by: Monviech <gitacc at pischem.com>
[CUDA][NVPTX] Add dp4a/dp2a builtins; define CUDA-13.4's __nv_idp*_impl externs (#233434)
Since CUDA 13.4 `__dp4a/__dp2a_lo/__dp2a_hi` from `sm_61_intrinsics.hpp`
call nvcc-internal device functions and are declared as plain `extern
"C"` in the corresponding header, namely ` __nv_idp4a_{s_s,u_u}_impl,
__nv_idp2a_{lo,hi}_{s_s,u_u}_impl`.
They were implemented as inline assembly before.
As a result, Clang leaves any use of `__dp4a` as an unresolved `.extern`
in the PTX and ptxas fails with
```
ptxas fatal : Unresolved extern function '__nv_idp4a_s_s_impl'
```
The NVPTX backend already has `llvm.nvvm.idp4a.* / llvm.nvvm.idp2a.*`.
This change:
* Exposes them as builtins: `__nvvm_idp4a_{s,u}_{s,u}` and
[6 lines not shown]
[mlir] Fold traverseRegionGraph into isRegionReachable (NFC)
traverseRegionGraph had one caller, and that caller's stop condition only
compared against the target region. Inline it into isRegionReachable as a
plain worklist search. Drop the "has no parent op" error path, which cannot
fire because every region on the worklist comes from the op's own
getSuccessorRegions. insideMutuallyExclusiveRegions now returns early when
both ops are in the same region instead of running both searches first.
Assisted-by: Claude Code (Opus 5.5).
[libc++] Replace __libcpp_allocate with std::allocator in small_bufer.h (#234158)
We use `__libcpp_allocate` and frineds only in very specific
circumstances. Instead of providing a private API we can make
`std::allocator` the default API for the uses of `__libcpp_allocate`.
This is a step towards that goal.