LLVM/project ff2fec3clang-tools-extra/clang-tidy/bugprone MissingEndComparisonCheck.cpp, clang-tools-extra/docs/clang-tidy/checks/bugprone missing-end-comparison.rst

[clang-tidy] Add `bugprone-missing-end-comparison` check (#182543)

This PR introduces a new check `bugprone-missing-end-comparison`.

It detects instances where the result of a standard algorithm is used
directly in a boolean context without being compared against the
corresponding end iterator.

Currently the check can't handle algorithms returning `std::pair` and
`std::ranges::mismatch_result`, but it should be a good enough starting
point for future improvements.

As of AI-Usage: Assisted by Gemini CLI (for pre-commit reviewing,
documentation and some code refactor/cleanup)
Closes https://github.com/llvm/llvm-project/issues/178731

---------

Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
DeltaFile
+241-0clang-tools-extra/clang-tidy/bugprone/MissingEndComparisonCheck.cpp
+175-0clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/std/algorithm
+166-0clang-tools-extra/test/clang-tidy/checkers/bugprone/missing-end-comparison.cpp
+123-0clang-tools-extra/test/clang-tidy/checkers/bugprone/missing-end-comparison-cxx20.cpp
+91-0clang-tools-extra/docs/clang-tidy/checks/bugprone/missing-end-comparison.rst
+50-0clang-tools-extra/test/clang-tidy/checkers/bugprone/missing-end-comparison-cxx17.cpp
+846-08 files not shown
+1,018-014 files

LLVM/project 602481aclang/test/CodeGen ubsan-strict-flex-arrays-ignorelist.c

improve testr

Created using spr 1.3.7
DeltaFile
+24-23clang/test/CodeGen/ubsan-strict-flex-arrays-ignorelist.c
+24-231 files

LLVM/project 734012dllvm/lib/Target/RISCV RISCVFrameLowering.cpp, llvm/test/CodeGen/RISCV cmp-zilsd-csr.ll saverestore-zilsd-fixed-location.ll

[RISCV] Disable Zilsd CSR-pair generation when push/pop or save-restore is enabled (#200623)

We were generating duplicate/worse code due to the generation of the
`Zilsd` load/store doubles for handling `CSR's` when `Zcmp/Xqccmp` or
`Save/Restore Libcalls` were enabled.
DeltaFile
+80-0llvm/test/CodeGen/RISCV/cmp-zilsd-csr.ll
+24-0llvm/test/CodeGen/RISCV/saverestore-zilsd-fixed-location.ll
+4-2llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+108-23 files

LLVM/project c510c73clang/include/clang/Serialization ASTRecordReader.h, clang/lib/AST ASTContext.cpp Type.cpp

trivial changes
DeltaFile
+20-14clang/lib/Sema/SemaOpenMP.cpp
+18-14clang/lib/AST/ASTContext.cpp
+16-15clang/lib/Sema/SemaTemplate.cpp
+14-11clang/lib/AST/Type.cpp
+14-8clang/lib/AST/ASTDiagnostic.cpp
+11-6clang/include/clang/Serialization/ASTRecordReader.h
+93-6833 files not shown
+207-15939 files

LLVM/project a262cabclang/lib/AST ASTContext.cpp ItaniumMangle.cpp, clang/lib/Sema SemaCXXScopeSpec.cpp SemaTemplate.cpp

[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
DeltaFile
+888-161clang/lib/AST/ASTContext.cpp
+328-12clang/test/SemaTemplate/instantiation-dependence.cpp
+178-96clang/lib/AST/ItaniumMangle.cpp
+100-98clang/lib/Sema/SemaCXXScopeSpec.cpp
+62-57clang/lib/AST/Type.cpp
+71-44clang/lib/Sema/SemaTemplate.cpp
+1,627-46869 files not shown
+2,391-79775 files

LLVM/project 8ce6c5fclang-tools-extra/clang-tidy/bugprone UseAfterMoveCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix false positive in bugprone-use-after-move for std::tie (#192895)

std::tie(a, b) = expr reinitializes all variables passed to std::tie
because the tuple assignment operator writes back through the stored
references. The check was not recognizing this pattern, causing a false
positive on the second std::tie assignment in loops like:

  std::tie(a, b) = foo(std::move(a), std::move(b));
  std::tie(a, b) = foo(std::move(a), std::move(b)); // false positive

Add std::tie assignment as a reinitialization case in
makeReinitMatcher().

Fixes #136105.

---

**AI Disclosure:** Claude (Anthropic) was used to assist in diagnosing
the CI test failure and identifying the off-by-one line number in the

    [5 lines not shown]
DeltaFile
+127-0clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
+9-0clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
+5-0clang-tools-extra/docs/clang-tidy/checks/bugprone/use-after-move.rst
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+146-04 files

FreeBSD/ports b4cafcclang/spidermonkey115 distinfo Makefile

lang/spidermonkey115: update to 115.36.0

Also set EXPIRATION_DATE now that no ports consumers remain
DeltaFile
+3-3lang/spidermonkey115/distinfo
+3-3lang/spidermonkey115/Makefile
+1-0lang/spidermonkey115/pkg-plist
+7-63 files

LLVM/project dbab3f7llvm/lib/Analysis IVDescriptors.cpp, llvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp VPlanConstruction.cpp

[VPlan] Move IV predicate handling to VPlan. (#192876)
DeltaFile
+262-102llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
+8-102llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+69-0llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+32-32llvm/test/Transforms/LoopVectorize/induction.ll
+33-18llvm/lib/Analysis/IVDescriptors.cpp
+6-43llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
+410-2978 files not shown
+490-31414 files

FreeBSD/ports d22150asecurity/vuxml/vuln 2026.xml

security/vuxml: add xwayland vulnerabilities

Sponsored by:   tipi.work
DeltaFile
+35-0security/vuxml/vuln/2026.xml
+35-01 files

LLVM/project 6029be7llvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.sched.group.barrier.gfx12.ll

[AMDGPU] Add IGLP mutations to CoexecSched

Change-Id: I91fe4079c8744dd41d5ddc7bd04c5b1691c13b78
DeltaFile
+116-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sched.group.barrier.gfx12.ll
+4-1llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+120-12 files

FreeBSD/ports 2576a24irc/halloy distinfo Makefile.crates

irc/halloy: update to 2026.7

Release notes: https://github.com/squidowl/halloy/releases/tag/2026.7

Remove no longer used USES=ssl

PR: 295749
Approved by: Andie Bradley (maintainer)
DeltaFile
+95-79irc/halloy/distinfo
+47-40irc/halloy/Makefile.crates
+2-3irc/halloy/Makefile
+144-1223 files

FreeBSD/ports 990dcd8security/vuxml/vuln 2026.xml

security/vuxml: add xorg-server vulnerabilities
DeltaFile
+35-0security/vuxml/vuln/2026.xml
+35-01 files

LLVM/project ad6366dclang/include/clang/AST ASTTypeTraits.h, clang/include/clang/Basic DirectoryEntry.h FileEntry.h

[clang][clang-tools-extra] Remove unused DenseMapInfo::getTombstoneKey (#200634)

#200595 changed DenseMap to no longer create tombstone buckets, so
DenseMapInfo<T>::getTombstoneKey() is never called. Remove dead
definitions and dead tombstone branches.
DeltaFile
+6-18clang/lib/CodeGen/CGObjCMacConstantLiteralUtil.h
+0-18clang/lib/APINotes/APINotesFormat.h
+1-14clang/lib/AST/ItaniumCXXABI.cpp
+3-12clang/include/clang/Basic/DirectoryEntry.h
+3-11clang/include/clang/Basic/FileEntry.h
+0-13clang/include/clang/AST/ASTTypeTraits.h
+13-8646 files not shown
+18-33952 files

FreeBSD/ports 36ffcd2security/vuxml/vuln 2026.xml

security/vuxml: fix x11-servers/xorg-server's PORTEPOCH

% make -V PORTEPOCH -f /usr/ports/x11-servers/xorg-server/Makefile
1

Sponsored by:   tipi.work
DeltaFile
+1-1security/vuxml/vuln/2026.xml
+1-11 files

LLVM/project a6255e4llvm/include/llvm/Transforms/Utils TriggerCrashPass.h, llvm/lib/CodeGen TargetPassConfig.cpp

Revert "[LLVM] Add flags to crash the opt/codegen pipeline" (#200977)

Reverts llvm/llvm-project#200967

Test failing on some buildbots:
https://lab.llvm.org/buildbot/#/builders/11/builds/41237
DeltaFile
+0-43llvm/lib/Transforms/Utils/TriggerCrashPass.cpp
+0-39llvm/include/llvm/Transforms/Utils/TriggerCrashPass.h
+22-1llvm/lib/Passes/PassBuilder.cpp
+0-13llvm/test/Other/trigger-crash-flags.ll
+0-10llvm/lib/CodeGen/TargetPassConfig.cpp
+0-8llvm/lib/Passes/PassBuilderPipelines.cpp
+22-1142 files not shown
+22-1168 files

FreeBSD/ports de7d02cdevel/py-ty distinfo Makefile

devel/py-ty: Update to 0.0.42

Changelog: https://github.com/astral-sh/ty/blob/0.0.42/CHANGELOG.md

Reported by:    Repology
DeltaFile
+3-3devel/py-ty/distinfo
+1-1devel/py-ty/Makefile
+4-42 files

LLVM/project ccd2606clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

[clang] fix getTemplateInstantiationArgs (#199528)

This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the
template context of out-of-line definitions.

This greatly simplifies the signature of that function, by removing a
bunch of workarounds, and simpliffying a couple that weren't removed
yet.

Since this now relies on qualifiers and template parameter lists, this
patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.

Also makes the explicit specialization AST nodes stop abusing the
template parameter lists by storing it's own template parameter list,
creating a dedicated field for them, similar to partial specializations.

Fixes #101330
DeltaFile
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+257-164clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+59-129clang/lib/Sema/SemaConcept.cpp
+60-92clang/lib/AST/DeclTemplate.cpp
+817-1,05652 files not shown
+1,456-1,71658 files

LLVM/project f9ae788clang-tools-extra/clangd/unittests SemanticHighlightingTests.cpp, clang/lib/Sema HeuristicResolver.cpp

[clang][HeuristicResolver] Handle non-dependent TemplateSpecializationType gracefully (#200714)

Fixes https://github.com/llvm/llvm-project/issues/197716
DeltaFile
+19-0clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
+9-5clang/lib/Sema/HeuristicResolver.cpp
+28-52 files

LLVM/project 62118b5llvm/lib/Target/SPIRV SPIRVBuiltins.cpp

[NFC][SPIR-V] Fix unused-variable in SPIRVBuiltins (#200842)
DeltaFile
+1-1llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+1-11 files

LLVM/project fdff843clang/include/clang/Basic NoSanitizeList.h, clang/lib/Basic NoSanitizeList.cpp

improve names

Created using spr 1.3.7
DeltaFile
+4-4clang/lib/Basic/NoSanitizeList.cpp
+2-2clang/include/clang/Basic/NoSanitizeList.h
+1-1clang/lib/CodeGen/CGExpr.cpp
+1-1clang/test/CodeGen/ubsan-strict-flex-arrays-ignorelist.c
+8-84 files

NetBSD/pkgsrc-wip 13a4f9abup-git Makefile

bup-git: Tidy test section

  - Drop python exclusion of 27 because it's now default
DeltaFile
+9-11bup-git/Makefile
+9-111 files

LLVM/project 814826dclang/test/CodeGen ubsan-strict-flex-arrays-ignorelist.c

eol

Created using spr 1.3.7
DeltaFile
+1-1clang/test/CodeGen/ubsan-strict-flex-arrays-ignorelist.c
+1-11 files

LLVM/project 3f8df5fclang/lib/CodeGen CGExpr.cpp

you are a world-class engineer

Created using spr 1.3.7
DeltaFile
+18-12clang/lib/CodeGen/CGExpr.cpp
+18-121 files

LLVM/project 6d0b3fdllvm/utils instrumentor-config-wizard.py

[Instrumentor] Improve the config wizard script (#199108)

This makes the config wizard script more generic as we grow
instrumentation opportunities. Better output, e.g., clear paths, are
also displayed now.

Prepared with Claude (AI) and tested by me afterwards.
DeltaFile
+279-153llvm/utils/instrumentor-config-wizard.py
+279-1531 files

FreeBSD/ports 3f253a0sysutils/desktop-installer distinfo Makefile

sysutils/desktop-installer: Update to 1.2.0.1

Fix termination trying to remove missing freebsd-update-notify
DeltaFile
+3-3sysutils/desktop-installer/distinfo
+2-1sysutils/desktop-installer/Makefile
+5-42 files

LLVM/project 10cd6cbllvm/include/llvm/Transforms/Utils TriggerCrashPass.h, llvm/lib/CodeGen TargetPassConfig.cpp

Revert "[LLVM] Add flags to crash the opt/codegen pipeline (#200967)"

This reverts commit 015d0479b94ce48e431398813525a59a16c6e4eb.
DeltaFile
+0-43llvm/lib/Transforms/Utils/TriggerCrashPass.cpp
+0-39llvm/include/llvm/Transforms/Utils/TriggerCrashPass.h
+22-1llvm/lib/Passes/PassBuilder.cpp
+0-13llvm/test/Other/trigger-crash-flags.ll
+0-10llvm/lib/CodeGen/TargetPassConfig.cpp
+0-8llvm/lib/Passes/PassBuilderPipelines.cpp
+22-1142 files not shown
+22-1168 files

LLVM/project 4ab99f1clang/lib/CodeGen CGExpr.cpp, clang/test/CodeGen ubsan-strict-flex-arrays-ignorelist.c

make no mistakes

Created using spr 1.3.7
DeltaFile
+25-8clang/test/CodeGen/ubsan-strict-flex-arrays-ignorelist.c
+15-10clang/lib/CodeGen/CGExpr.cpp
+40-182 files

Illumos/gate 44e9e35usr/src/test/zfs-tests/include libtest.shlib, usr/src/test/zfs-tests/tests/functional/cache cleanup.ksh

18129 Improve zfs-test cleanup reliability
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Robert Mustacchi <rm+illumos at fingolfin.org>
DeltaFile
+22-0usr/src/test/zfs-tests/include/libtest.shlib
+2-2usr/src/test/zfs-tests/tests/functional/cache/cleanup.ksh
+2-2usr/src/test/zfs-tests/tests/functional/slog/cleanup.ksh
+26-43 files

Illumos/gate fae125ausr/src/test/test-runner/cmd run, usr/src/test/test-runner/stf/include stf.shlib

18127 Improve test-runner interrupt handling
Reviewed by: Toomas Soome <tsoome at me.com>
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Approved by: Robert Mustacchi <rm+illumos at fingolfin.org>
DeltaFile
+81-20usr/src/test/test-runner/cmd/run
+7-4usr/src/test/test-runner/stf/include/stf.shlib
+88-242 files

LLVM/project c923538llvm/lib/Target/DirectX DirectXTargetMachine.cpp, llvm/test/CodeGen/DirectX llc-pipeline.ll

[DirectX] Disable DCE and DSE for -O0 (#192520)

These are optimisation passes which are inappropriate to run when the
user has requested no optimisations, and which make it more difficult to
write tests.

Co-authored-by: Andrew Savonichev <andrew.savonichev at gmail.com>
DeltaFile
+13-11llvm/test/CodeGen/DirectX/llc-pipeline.ll
+8-2llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
+21-132 files