[clang] Backport: allow canonicalizing assumed template names
Assumed template names are part of error recovery and encode just a
declaration name, making them always canonical. This patch allows
them to be canonicalized, which is trivial.
Backport from #183222
Fixes #183075
[clang] Backport: NestedNameSpecifier typo correction fix
This stops typo correction from considering template parameters
as candidates for a NestedNameSpecifier when it has a prefix itself.
I think this is better than the alternative of accepting these candidates,
but otherwise droping the prefix, because it seems more far-fetched that
someone would actually try to refer to a template parameter this way.
Since this regression was never released, there are no release notes.
Backport from #181239
Fixes #167120
freebsd-update: Error for -b basedir without UNAME_r set
freebsd-update sets the currently running release from UNAME -r, which
can be overridden via the --currently-running commandline option (or by
setting UNAME_r in the environment). This may be invalid if -b is used
to specify a basedir other than /, so error out if -b is specified
without setting the currently running version.
PR: 283229
Reviewed by: cperciva
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48016
(cherry picked from commit 097458ac665db732cc91a22279da4cc14f694da2)
[clang] Backport: stop error recovery in SFINAE for narrowing in converted constant expressions
A narrowing conversion in a converted constant expression should produce an
invalid expression so that [temp.deduct.general]p7 is satisfied, by stopping
substitution at this point.
Fixes #167709
[AMDGPU] Handle GFX1250 hazards between WMMA and VOPD (#183573)
Hazards between WMMA and VALU were handled in #149865 but this only
worked for regular VOP* VALU encodings, not for VOPD.
Fixes: #183546
[clang] create local instantiation scope for matching template template parameters
This fixes a bug where a partial substitution from the enclosing scope
is used to prepopulate an unrelated template argument deduction.
Backport from #183219
Fixes #181166
asmc(4): pull 32-bit support for the driver
The asmc(4) driver should work for 32-bit Intel-based Macs, in theory, if
the model details were added to the detection list. That being said,
32-bit Intel Macs were only released and available to the general public
for 8 months [1], so the value in maintaining i386 support in the driver is
reduced due to limited hardware access.
Remove 32-bit support for the driver officially to make it clear its use is
not supported.
This should fix building `NOTES.i386` by proxy as well.
Relnotes: yes
MFC after: 2 weeks
Fixes: f224591746b ("Add ASMC_DEBUG make option")
Fixes: 8342d9f7b5f ("asmc(4): Stop building it on i386, as...")
Differential Revision: https://reviews.freebsd.org/D55544
[alpha.webkit.NoDeleteChecker] Check if each field is trivially destructive (#183711)
This PR fixes the bug that NoDeleteChecker and trivial function analysis
were not detecting any non-trivial destruction of class member
variables.
When evaluating a delete expression or calling a destructor directly for
triviality, check if each field in the class and its base classes is
trivially destructive.
[libc][math] Refactor bf16sub family to header-only (#182115)
Refactors the bf16sub math family to be header-only.
Closes https://github.com/llvm/llvm-project/issues/182114
Target Functions:
- bf16sub
- bf16subf
- bf16subf128
17605 !dohwcksum should also disable LSO
Reviewed by: Kyle Simpson <kyle at oxide.computer>
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Approved by: Dan McDonald <danmcd at Edgecast.io>
[clang] stop error recovery in SFINAE for narrowing in converted constant expressions (#183614)
A narrowing conversion in a converted constant expression should produce
an invalid expression so that [temp.deduct.general]p7 is satisfied, by
stopping substitution at this point.
This regression was introduced in #164703, and this will be backported
to clang-22, so no release notes.
Fixes #167709
[flang] Fix explanatory messages for generic resolution error (#183565)
The compiler emits messages to explain why each of a generic procedure's
specific procedures is not a match for a given set of actual arguments.
In the case of specific procedures with PASS arguments in derived type
procedure bindings or procedure components, these explanatory messages
are often bogus, because the re-analysis didn't adjust the actual
arguments to account for the PASS argument. Fix.
[Driver][SYCL] Add tests for -Xarch_<arch> option forwarding to SYCL JIT compilation. (#178025)
This change adds test coverage to verify that options passed via
`-Xarch_<arch> <option>` are correctly forwarded to SYCL JIT
compilations.
[clang-format] Fix SpaceBeforeParens with explicit template instantiations (#183183)
This fixes explicit template instantiated functions not having spaces
added/removed based on the value of `SpaceBeforeParens`.
Attribution Note - I have been authorized to contribute this change on
behalf of my company: ArenaNet LLC
[CIR] Implement TryOp flattening (#183591)
This updates the FlattenCFG pass to add flattening for cir::TryOp in
cases where the TryOp contains catch or unwind handlers.
Substantial amounts of this PR were created using agentic AI tools, but
I have carefully reviewed the code, comments, and tests and made changes
as needed. I've left intermediate commits in the initial PR if you'd
like to see the progression.
[Clang][ItaniumMangle] Fix recursive mangling for lambda init-captures (#182667)
[Clang][ItaniumMangle] Fix recursive mangling for lambda init-captures
Mangle computation for lambda signatures can recurse when a call
operator type
references an init-capture (for example via decltype(init-capture)). In
these
cases, mangling can re-enter the init-capture declaration and cycle back
through
operator() mangling.
Make lambda context publication explicit and independent from numbering
state,
then use that context uniformly during mangling:
* Publish lambda `ContextDecl` in `Sema::handleLambdaNumbering()` before
numbering, so dependent type mangling can resolve the lambda context
without
recursing through the call operator.
[19 lines not shown]