[Clang] Dump noexcept expression in compound requirement AST dumps
When a compound requirement has a noexcept(expr) specification, the
expression is now visited as a child node in AST dumps. The text dumper
also shows "noexcept(expr)" instead of just "noexcept" to indicate the
presence of the expression.
Fix noexcept requirement not being checked when concept is used in another concept
The RecursiveASTVisitor was not traversing the noexcept expression in
compound requirements, causing template parameters used only in noexcept
expressions to be missed during constraint normalization.
This resulted in concepts with dependent noexcept requirements (like
noexcept(noexc) where noexc is a template parameter) not being properly
evaluated when the concept was used inside another concept definition.
Fix by adding traversal of getNoexceptExpr() in
TraverseConceptExprRequirement.
Test: Uncommented and verified the test case in compound-requirement.cpp
that was previously commented out because it didn't work.
[SelectionDAG] Add CTTZ_ELTS[_ZERO_POISON] nodes. NFCI (#185600)
Currently llvm.experimental.cttz.elts are directly lowered from the
intrinsic.
If the type isn't legal then the target tells SelectionDAGBuilder to
expand it into a reduction, but this means we can't split the operation.
E.g. it's possible to split a cttz.elts nxv32i1 into two nxv16i1,
instead of expanding it into a nxv32i64 reduction.
vp.cttz.elts can be split because it has a dedicated SelectionDAG node.
This adds CTTZ_ELTS and CTTZ_ELTS[_ZERO_POISON] nodes and just enough
legalization to get tests passing. A follow up patch will add splitting
and move the expansion into LegalizeDAG.
[Clang] Support noexcept(expr) in C++ concepts compound requirements
This patch implements P3822R0 support for noexcept specifications with constant expressions in C++20 concepts compound requirements.
Previously, only 'noexcept' keyword was supported, which is now
equivalent to 'noexcept(true)'.
[CIR] Fix reference alignment to use pointee type
getNaturalTypeAlignment on a reference type returned pointer alignment
instead of pointee alignment. Pass the pointee type with
forPointeeType=true to match traditional codegen's
getNaturalPointeeTypeAlignment behavior. Fix applies to both argument
and return type attribute construction paths.
[CIR] Emit inbounds nuw flags on GetMemberOp GEP lowering
Struct member accesses via GetMemberOp are always inbounds and cannot
unsigned-wrap, matching LLVM's IRBuilder::CreateStructGEP behavior.
[orc-rt] Add LockedAccess utility. (#186737)
LockedAccess provides pointer-like access to a value while holding a
lock. All accessors are rvalue-ref-qualified, restricting usage to
temporaries to prevent accidental lock lifetime extension. A with_ref
method is provided for multi-statement critical sections.
make ttm_device_prepare_hibernation() return early
kettenis reports the ttm_tm_swapout() change is not enough to fix
hibernate with amdgpu when X is running.
The call to ttm_device_prepare_hibernation()/ttm_tm_swapout() in the
hibernate path was added in a linux commit from 2025:
924dda024f3bea64be5f3ac067a075e466739dc9
drm/amdgpu: move GTT to shmem after eviction for hibernation
The linux reason for doing this (server cards with lots of VRAM) isn't
something that concerns us.
ok kettenis@
When pledged, the special access(2) inspection for "/etc/localtime" has not
been needed since changes made in lib/libc/time/localtime.c 1.58 (2019)
pointed out by david leadbeater
[clang] DeducedTypes deduction kind fix and improvement
This is a small refactor of how DeducedType and it's derived types are
represented.
The different deduction kinds are spelled out in an enum, and how this
is tracked is simplified, to allow easier profiling.
How these types are constructed and canonicalized is also brought more
in line with how it works for the other types.
This fixes a crash reported here: https://github.com/llvm/llvm-project/issues/167513#issuecomment-3692962115
[clang] DeducedTypes deduction kind fix and improvement
This is a small refactor of how DeducedType and it's derived types are
represented.
The different deduction kinds are spelled out in an enum, and how this
is tracked is simplified, to allow easier profiling.
How these types are constructed and canonicalized is also brought more
in line with how it works for the other types.
This fixes a crash reported here: https://github.com/llvm/llvm-project/issues/167513#issuecomment-3692962115
[clang] Skip dllexport of inherited constructors with unsatisfied constraints (#186497)
When a class is marked `__declspec(dllexport)`, Clang eagerly creates
inherited constructors via `findInheritingConstructor` and propagates
the dllexport attribute to all members. This bypasses overload
resolution, which would normally filter out constructors whose requires
clause is not satisfied. As a result, Clang attempted to instantiate
constructor bodies that should never be available, causing spurious
compilation errors.
Add constraint satisfaction checks in `checkClassLevelDLLAttribute` to
match MSVC behavior:
1. Before eagerly creating inherited constructors, verify that the base
constructor's `requires` clause is satisfied. Skip creation otherwise.
2. Before applying dllexport to non-inherited methods of class template
specializations, verify constraint satisfaction. This handles the case
where `dllexport` propagates to a base template specialization whose own
[9 lines not shown]
[clang] DeducedTypes deduction kind fix and improvement
This is a small refactor of how DeducedType and it's derived types are
represented.
The different deduction kinds are spelled out in an enum, and how this
is tracked is simplified, to allow easier profiling.
How these types are constructed and canonicalized is also brought more
in line with how it works for the other types.
This fixes a crash reported here: https://github.com/llvm/llvm-project/issues/167513#issuecomment-3692962115