[LV] Report why a pointer induction with a non-constant step is rejected (#237888)
Instead of falling through to the generic diagnostic for an unidentified
PHI.
[Demangle] Keep template parameters of a local entity for the enclosing encoding
For a template function-local entity such as a generic lambda's
operator(), e.g. _ZZ4mainENK3$_0clIiEEDaT_, the template arguments of the
entity are parsed inside parseLocalName under a SaveTemplateParams scope
that restores the outer parameters on exit. The enclosing <encoding> then
parses its return type and parameter types (Da, T_) with no template
parameters, so T_ is rejected and the whole name is left mangled.
Keep the entity's template parameters when it ends with template
arguments so the enclosing encoding can resolve them. Found by asserting
that clang-generated names demangle.
Godbolt (clang trunk vs GCC 15.3; clang spells the closure `$_0`, GCC `UlT_E_`):
https://godbolt.org/z/3Mzx9rso8
Part of #111345.
LLM-aided
[Demangle] Allow template arguments on the type of a conversion expression
A conversion expression 'cv <type> <expression>' parsed its type with
template-argument parsing disabled, so a template template parameter or
substitution followed by template arguments, as in S1_IT0_E, was not
accepted. No <expression> starts with 'I', so there is no ambiguity.
GCC emits the same form for decltype(S1<T>().~U()); clang's own
mangling of CodeGenCXX/mangle.cpp test51 fun3 hit this and could not be
demangled.
Part of #111345.
LLM-aided
[Demangle] Support template arguments on vendor extended types
The Itanium ABI grammar is 'u <source-name> [<template-args>]', but the
demangler only accepted a single type argument after the name (used for
builtin type transformations). Clang emits names such as
u11matrix_typeILm1ELm2EjE for matrix types and HLSL, which were left
mangled. Parse general template arguments; a single type argument keeps
the existing transformation output.
Part of #111345.
LLM-aided
[Demangle] Support D-prefixed types in literals
<expr-primary> ::= L <type> <value number> E, and <type> includes the
D-prefixed builtin types (DB<n>_ for _BitInt, Du for char8_t, ...).
parseExprPrimary only accepted LDn0E and rejected every other L D...
literal, so names such as _Z1fILDu114EEvv and
_Z16ManglingTestNTTPILDB99_38EEvv could not be demangled. Treat them
as ordinary typed literals. LDm (C++26 reflection) is still rejected.
Godbolt (clang trunk and GCC 15.3 emit the same symbol for a char8_t template argument):
https://godbolt.org/z/x4eYGnKaf
Part of #111345.
LLM-aided
[ci] Keep the test-suite checkout alive in the LLVM test-suite LNT runs
Due to the K8s issue #226230, downloading the LLVM Test Suite can time
out. Note that it's not sufficient to use the usual GIT_TRACE workaround,
since that only produces output around the download, not during the
download, which seems to be over 5 minutes on bad days for the LLVM Test
Suite.
Assisted by Claude
[scudo] Use a u32 for ClassSize variable. (#238111)
On 64 bit systems, this removes a gap in the PerClass struct and shrinks
the total size. The maximum value of ClassSize should never overflow
this value.
RuntimeLibcalls: Add signatures for the divrem libcalls
Add struct types to the signature table so libcalls returning multiple
values can be described in TableGen. Use them for the ARM, Windows and
AVR divmod functions, which return the quotient and remainder in
registers, instead of building their types in C++.
The other divrem libcalls use the compiler-rt prototype, which stores
the remainder through a pointer. AVR gets its own __divmodsi4 and
__udivmodsi4, since ARM Darwin uses the compiler-rt functions with
those names.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Add dead_on_return for destructors (#235125)
This change adds the dead_on_return attribute for the `this` argument to
destructors unless `-fno-lifetime-dse` was used.
Assisted-by: Cursor / claude-opus-5.5