[compiler-rt] Add MSVC CRT flags to ASan coverage test (#195719)
The ASan coverage test also links clang_rt.profile because it uses
-coverage. On Windows MSVC, this can fail if the test is linked with the
static CRT but clang_rt.profile was built with the dynamic CRT.
For example, a profile runtime that uses /MD may reference DLL CRT
symbols
such as __imp_* symbols. Add the same dynamic CRT flags directly to this
one test on Windows MSVC so it keeps linking when clang_rt.profile
changes.
[InlineOrder] Remove unused InlineHistoryMap (#195769)
This patch removes InlineHistoryMap, an unused variable. The last
use was removed by:
commit 3af427539bc6b85a9fe3334b9a0b43d347ea29ac
Author: Arthur Eubanks <aeubanks at google.com>
Date: Wed Apr 8 09:34:52 2026 -0700
[clang][P2719] Relax requirements for matching operator new and delete
The most recent revision of P2719 introduced very strict rules about
matching parameter sets between type aware operators new and delete.
The intention was to resolve the classic "no matching operator delete
has been found so the object will silently leak" problem. The strict
rules however made deleting objects that had a placement new
"impossible".
I missed this however as all of our large scale tests involved
projects that were already using manually implemented allocators
(often trying to support type isolation). The problem with this from
a validation point of view is simple: all of these projects had
existing class scoped operators, and the untyped delete was silently
selected, avoiding the need for a non-placement type-aware delete
that would conflict with the placement cleanup delete.
The next revision of P2719 resolves this by removing the exact type
[6 lines not shown]
[libunwind] Add SME detection for Apple platforms (#193630)
Copy SME detection sysctl code from ZA test. Also fix a
logic issue in the original code while being reviewed.
[libcxx] Remove ASan container overflow checks for SSO strings (#194208)
Essentially a revert of #79536, although manual given how much the code
has changed.
Doing container overflow checks on SSO strings is fundamentally unsound
due to how they interact with compiler optimizations within LLVM, which
assume that the entire object is dereferencable when it is live. LLVM
can sometimes insert speculative loads that will create false positives
when they try and load a partially filled SSO buffer. This was
previously prevented using inline asm barriers within std::string
itself. However, this can also manifest in other ways, with the
motivating example for the revert being GlobalOpt inserting a
speculative load of a std::variant containing a SSO std::string, causing
an ASan failure.
[NVPTX] Fix for LTO dwarf emission when multiple CUs with a mix of DebugDirectivesOnly and NoDebug (#190371)
Only emit the initial .loc dwarf directive if the CU requires debug
information. When a module contains multiple CUs where one is
DebugDirectiveOnly and the rest are NoDebug, we attempt to emit dwarf
for the NoDebug compile units leading to an assertion when calling
emitDwarfFile0Directive when in getOrCreateDwarfCompileUnit.
I added a lit test for this case which used to assert.
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.
This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.
Fixes #8740
Fixes #61818
Fixes #190388
[clang][ExprConst] Add another missing `NoteLValueLocation()` call (#195098)
This is a little more work since it requires a new parameter for all the
`found()` handlers.
[RFC][IR] Support vector splats in `ConstantPointerNull` (#195486)
This PR allows `ConstantPointerNull` to represent both scalar pointer
nulls and fixed or scalable vector splats of pointer nulls. This change
first aligns with the native splat behavior of `ConstantInt` and
`ConstantFP`, and second, makes it easier to eventually change the
semantics of `ConstantPointerNull` to represent a semantic null pointer
instead of a zero value, which is what it represents today.
[asan] Add HINT prefix to poison_history_size suggestions (#195733)
Consistency update to prefix poison tracking suggestions with "HINT:"
to match other ASan diagnostic hints.
[asan] Only suggest increasing poison_history_size if the buffer is full (#195732)
I unlikely but possible to setup shadow state, e.g unpoison heap red
zone just after partial granule.
If buffer is not full, increasing it will not help.
[NFC][asan] Re-use ErrorGeneric::shadow_val (#195684)
It's done to reduce code size, as additional load on reporting is
negligible.
This requires change in ErrorGeneric constructor, to now we skip partial
shadow only if next one has a better value.
Before shadow_val was either `0x[a-f].` or 0.
Now it may be partial granule as well.
However it's NFC as `0 < shadow_val < ASAN_SHADOW_GRANULARITY` does not
affect reporting outside of `CheckPoisonRecords`.
[libc][semaphore] Zero-initialize rand_bytes to fix GCC warning (#195757)
GCC 15 warns about `rand_bytes` being maybe uninitialized when passed to
`getrandom`. Since `getrandom` writes to it, it doesn't strictly need
initialization, but zero-initializing it satisfies the compiler and
avoids the `-Werror=maybe-uninitialized` error.
Fix for https://github.com/llvm/llvm-project/pull/192278
Assisted by Gemini
[RFC][IR] Support vector splats in `ConstantPointerNull`
This PR allows `ConstantPointerNull` to represent both scalar pointer nulls and
fixed or scalable vector splats of pointer nulls. This change first aligns with
the native splat behavior of `ConstantInt` and `ConstantFP`, and second, makes
it easier to eventually change the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero value, which is what it
represents today.