LLVM/project 0f37c48clang/docs ClangFormatStyleOptions.rst, clang/lib/Format TokenAnnotator.cpp Format.cpp

[clang-format] Add AlignConsecutiveEnums (#194154)

Address #52983. Add ability to align enums similar to how bit fields are
done.

---------

Co-authored-by: Aaron Saw Min Sern <aaron at aaronsms.com>
DeltaFile
+36-35clang/unittests/Format/ConfigParseTest.cpp
+35-0clang/docs/ClangFormatStyleOptions.rst
+21-2clang/unittests/Format/AlignmentTest.cpp
+13-4clang/lib/Format/TokenAnnotator.cpp
+11-5clang/lib/Format/Format.cpp
+12-1clang/lib/Format/WhitespaceManager.cpp
+128-474 files not shown
+139-4710 files

LLVM/project 414c1ffclang/docs LanguageExtensions.rst, clang/include/clang/Options Options.td

Enable driver changes for fexec-charset
DeltaFile
+14-6clang/lib/Driver/ToolChains/Clang.cpp
+14-4clang/include/clang/Options/Options.td
+11-3clang/test/Driver/clang_f_opts.c
+10-0llvm/lib/Support/TextEncoding.cpp
+4-3clang/test/Driver/cl-options.c
+3-3clang/docs/LanguageExtensions.rst
+56-193 files not shown
+60-199 files

LLVM/project 1c0ee35clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()
DeltaFile
+10-0clang/lib/AST/ASTContext.cpp
+5-4clang/lib/Lex/TextEncodingConfig.cpp
+4-0clang/test/CodeGen/systemz-charset.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+24-45 files

LLVM/project db20a98libc/include/llvm-libc-types pthread_id_np_t.h, libc/src/pthread pthread_getunique_np.cpp pthread_getunique_np.h

[libc] Implement pthread_getthreadid_np and pthread_getunique_np. (#197027)

This is an alternative to
https://github.com/llvm/llvm-project/pull/195202 which uses @petrhosek
's suggestion to use an existing `pthread_getthreadid_np()` instead.

We define two functions:
* pthread_getthreadid_np - to return a thread-id for the current thread.
**NOTE:** We're using the IBM variant of this function
(https://www.ibm.com/docs/en/i/7.6.0?topic=ssw_ibm_i_76/apis/users_22.html)
instead of FreeBSD one
(https://man.freebsd.org/cgi/man.cgi?pthread_getthreadid_np), so that we
can return a more-opaque integral type (in our case - `uintptr_t` rather
than `int`).
* pthread_getunique_np - it's even less standard one. We're also using
IBM variant here
(https://www.ibm.com/docs/en/i/7.6.0?topic=ssw_ibm_i_76/apis/users_23.html).
This one is needed because we need to have the capability to convert
`pthread_t` into a numeric ID.
DeltaFile
+35-0libc/src/pthread/pthread_getunique_np.cpp
+28-0libc/src/pthread/pthread_getunique_np.h
+27-0libc/src/pthread/pthread_getthreadid_np.cpp
+26-0libc/src/pthread/pthread_getthreadid_np.h
+23-0libc/src/pthread/CMakeLists.txt
+21-0libc/include/llvm-libc-types/pthread_id_np_t.h
+160-09 files not shown
+200-015 files

LLVM/project 55b4dbbclang/lib/AST PrintfFormatString.cpp FormatString.cpp, clang/lib/Sema SemaChecking.cpp

Add format string handling
DeltaFile
+58-31clang/lib/AST/PrintfFormatString.cpp
+46-40clang/lib/AST/FormatString.cpp
+33-21clang/lib/Sema/SemaChecking.cpp
+25-11clang/lib/AST/FormatStringParsing.h
+15-8clang/lib/AST/ScanfFormatString.cpp
+19-0llvm/lib/Support/TextEncoding.cpp
+196-1117 files not shown
+232-11913 files

LLVM/project b78a8b9clang/include/clang/AST Expr.h, clang/lib/AST Expr.cpp

fix CI
DeltaFile
+14-0clang/lib/AST/Expr.cpp
+6-0clang/include/clang/AST/Expr.h
+3-2clang/lib/Sema/SemaExpr.cpp
+23-23 files

LLVM/project c0dcb10clang/test/CodeGen systemz-charset.c

fix CI
DeltaFile
+2-0clang/test/CodeGen/systemz-charset.c
+2-01 files

LLVM/project 3df84ebclang/include/clang/Sema Sema.h

Fix build failure
DeltaFile
+1-0clang/include/clang/Sema/Sema.h
+1-01 files

LLVM/project 35fb743clang/include/clang/Sema Sema.h

Remove old include
DeltaFile
+0-1clang/include/clang/Sema/Sema.h
+0-11 files

LLVM/project d0e8a0aclang/lib/Parse ParseDecl.cpp ParseExpr.cpp, clang/lib/Sema SemaExpr.cpp

add ParserConversionAction, do not translate unevaluated strings
DeltaFile
+15-0clang/test/CodeGen/systemz-charset.c
+6-5clang/lib/Sema/SemaExpr.cpp
+10-0clang/lib/Parse/ParseDecl.cpp
+9-0clang/test/CodeGen/systemz-charset-diag.cpp
+3-3clang/lib/Parse/ParseExpr.cpp
+4-0clang/lib/Parse/Parser.cpp
+47-83 files not shown
+53-99 files

LLVM/project 931610fclang/lib/Lex LiteralSupport.cpp, clang/test/CodeGen systemz-charset.cpp

move conversion into EncodeUCNEscape, update testcase
DeltaFile
+23-27clang/lib/Lex/LiteralSupport.cpp
+3-0clang/test/CodeGen/systemz-charset.cpp
+26-272 files

LLVM/project 2751aa9clang/include/clang/Lex TextEncodingConfig.h LiteralSupport.h, clang/lib/Lex LiteralSupport.cpp TextEncodingConfig.cpp

This patch enables the fexec-charset option to control the execution charset of string literals. It sets the default internal charset, system charset, and execution charset for z/OS and UTF-8 for all other platforms.
DeltaFile
+139-31clang/lib/Lex/LiteralSupport.cpp
+70-0clang/test/CodeGen/systemz-charset.cpp
+58-0clang/test/CodeGen/systemz-charset.c
+45-0clang/lib/Lex/TextEncodingConfig.cpp
+34-0clang/include/clang/Lex/TextEncodingConfig.h
+12-7clang/include/clang/Lex/LiteralSupport.h
+358-3813 files not shown
+409-4619 files

LLVM/project 20ff0b7llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 spillcost-noreturn-block.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+31-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1-1llvm/test/Transforms/SLPVectorizer/AArch64/spillcost-noreturn-block.ll
+32-12 files

LLVM/project 22a056eclang/include/clang/Tooling DependencyScanningTool.h, clang/lib/Tooling DependencyScanningTool.cpp

[clang][deps] Use single controller instance for by-name scans (#197266)

This avoids creating redundant instances of `DependencyActionController`
in the by-name scanning APIs. NFCI
DeltaFile
+5-11clang/lib/Tooling/DependencyScanningTool.cpp
+6-6clang/include/clang/Tooling/DependencyScanningTool.h
+5-3clang/tools/clang-scan-deps/ClangScanDeps.cpp
+16-203 files

LLVM/project 40da692clang/include/clang/Basic DiagnosticFrontendKinds.td, clang/lib/CodeGen CodeGenModule.cpp

Reland "[Clang][CodeGen] Report when an alias points to an incompatible target" (#195550)

This relands #192397, which was reverted in #194106. The new version
includes the following fixes:
- Set an explicit triple in the `attr-alias.m` test because aliases are
not supported on Darwin.
- Relax the check to only diagnose mismatches in return types and
parameter lists, while ignoring exception specifications and other
attributes.

Original description follows:

Add checks to ensure that an alias and its target have compatible types:
- Generate an error if a function alias points to a variable or vice
versa.
- Issue a warning for mismatches in function types.
- Ignore type discrepancies for variables.

This behavior aligns with similar diagnostics in GCC.

Resolves: #47301
DeltaFile
+66-0clang/lib/CodeGen/CodeGenModule.cpp
+55-0clang/test/Sema/attr-alias-elf.c
+13-0clang/test/SemaCXX/attr-alias.cpp
+6-1compiler-rt/lib/dfsan/dfsan_custom.cpp
+6-0clang/include/clang/Basic/DiagnosticFrontendKinds.td
+6-0clang/test/SemaObjC/attr-alias.m
+152-12 files not shown
+157-28 files

FreeBSD/ports 0efaa3edevel/sem distinfo Makefile.crates

devel/sem: Update to 0.5.4
DeltaFile
+113-107devel/sem/distinfo
+55-52devel/sem/Makefile.crates
+1-1devel/sem/Makefile
+169-1603 files

FreeNAS/freenas 41a9c1dtests/sharing_protocols/iscsi test_262_iscsi_alua.py

Add restore_active_node fixture
DeltaFile
+41-1tests/sharing_protocols/iscsi/test_262_iscsi_alua.py
+41-11 files

FreeNAS/freenas 54e098dtests/sharing_protocols/iscsi test_262_iscsi_alua.py

iSCSI ALUA: regression test for failover LUN-replace stall

Add an extended test that builds 2 targets (25 + 10 LUNs), opens an
iSCSI session to the standby on the 25-LUN target so the kernel has
tgt_devs to clean up during become_active, then triggers an ungraceful
failover via poweroff_vm. Asserts:

  - /var/log/failover.log on the new master does not contain
    'Failed to restart service "iscsitarget" after 15 seconds',
    which would indicate the LUN-replace loop stalled.
  - /sys/kernel/scst_tgt/async_lun_replace reads 0 after failover,
    confirming reset_active released the parked cleanup work.
  - All LUNs are reachable on the new master.

A function-scoped fixture handles recovery (start_vm, wait_for_backup,
wait_for_settle) so the cluster is restored to a clean two-node state
even if an assertion above failed.

Uses the dataset() asset helper rather than zvol() for lower
per-extent overhead at this scale.
DeltaFile
+210-1tests/sharing_protocols/iscsi/test_262_iscsi_alua.py
+210-11 files

FreeNAS/freenas 89ac795src/middlewared/middlewared/plugins dlm.py

Remove logout all HA targets from reset_active
DeltaFile
+2-5src/middlewared/middlewared/plugins/dlm.py
+2-51 files

FreeNAS/freenas 23c6abasrc/middlewared/middlewared/plugins/iscsi_ scst.py alua.py

Release parked async LUN-replace cleanup after DLM peer eviction

scst.async_lun_replace=1 now also tells the kernel to park the deferred
cleanup of old tgt_devs from each LUN replace until the flag is cleared.
This avoids stalling become_active on scst_dlm_lock_wait inside
scst_clear_reservation while the dead peer is still a DLM lockspace
member.

Add iscsi.scst.disable_async_lun_replace and call it from the end of
iscsi.alua.reset_active, after dlm.reset_active (which evicts the peer)
completes.
DeltaFile
+20-1src/middlewared/middlewared/plugins/iscsi_/scst.py
+10-2src/middlewared/middlewared/plugins/iscsi_/alua.py
+30-32 files

LLVM/project 3724713clang/include/clang/Basic DiagnosticLexKinds.td, clang/test/Lexer __counter__-system-include.c

[clang] Don't warn on __COUNTER__ in system macros (#196689)

The introduction of extension and compatibility warnings means that
`__COUNTER__` has started causing warnings (and -Werror= build failures)
due to use of system APIs.

This PR simply ensures that these diagnostics don't get reported for
system macro expansions as well.
DeltaFile
+18-0clang/test/Lexer/__counter__-system-include.c
+7-0clang/test/Lexer/Inputs/__counter__-system-header.h
+2-2clang/include/clang/Basic/DiagnosticLexKinds.td
+27-23 files

LLVM/project 4eb0cd6llvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp

[reviews] reduce overhead
DeltaFile
+8-6llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+8-61 files

FreeBSD/ports 2c91f26math/calc distinfo Makefile

math/calc: Update to 2.16.1.3

Changes: https://github.com/lcn2/calc/releases/tag/v2.16.1.3
DeltaFile
+3-3math/calc/distinfo
+1-1math/calc/Makefile
+4-42 files

FreeBSD/src 714f6acetc/mtree BSD.root.dist

BSD.root.dist: Correct tag for /etc/sysctl.kld.d

This is only used by rc.subr and belongs in rc, not runtime.

Fixes:          fa6d67cd16b5 ("BSD.root.dist: Add package tag for all directories")
MFC after:      3 days
Reviewed by:    ivy
Differential Revision:  https://reviews.freebsd.org/D56900

(cherry picked from commit 44338ccd12685621c4b1c57e692a4f27f5a655d3)
DeltaFile
+1-1etc/mtree/BSD.root.dist
+1-11 files

FreeNAS/freenas aa77b6dtests/sharing_protocols/iscsi test_262_iscsi_alua.py

Add restore_active_node fixture
DeltaFile
+41-1tests/sharing_protocols/iscsi/test_262_iscsi_alua.py
+41-11 files

LLVM/project e365ea8llvm/lib/Bitcode/Reader MetadataLoader.cpp, llvm/test/Bitcode upgrade-subprogram.ll upgrade-subprogram.ll.bc

[DebugInfo] Robustify DISubprogram upgrade (#190611)

The bitcode upgrade process for DISubprogram was fragile and depended on
the exact order in which DICompileUnit, DISubprogram, and the list of
DISubprograms were emitted. This would work out okay with bitcode
written by standard LLVM, but was not a rule that the old format had.
This commit makes the upgrade process work when these metadata nodes are
emitted in any order, and updates the existing upgrade-subprogram.ll
test to cover all orders. The corresponding .bc file was written by a
patched version of LLVM 3.7 that provides a hook to force nodes to be
emitted in a specific order and can be inspected with llvm-bcanalyzer
--dump.
DeltaFile
+66-8llvm/test/Bitcode/upgrade-subprogram.ll
+5-9llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+0-0llvm/test/Bitcode/upgrade-subprogram.ll.bc
+71-173 files

FreeBSD/src 379805busr.sbin/ctld login.cc

ctld: normalize iSCSI TargetName on login

Case-insensitive TargetName matching on logins was accidentally removed,
let's fix that by normalizing TargetName again according to RFC 3722.

Approved by:    re (cperciva)
PR:                     294522
Fixes:                  4b1aac931465f39c5c26bfa1d5539a428d340f20
Sponsored by:           ConnectWise
Reviewed by:            asomers, jhb
Approved by:            asomers (mentor)
Differential Revision:  https://reviews.freebsd.org/D56469

(cherry picked from commit eb837cb8b2073c09bafaf3318f5bb103827b2bca)
(cherry picked from commit 0baae6223a6350215d7b11264e59408362b15a19)
DeltaFile
+8-2usr.sbin/ctld/login.cc
+8-21 files

FreeBSD/src a7bc1c0sbin/fsck_msdosfs fat.c

fsck_msdosfs: fix FAT header correction not persisting in cache mode

When fsck_msdosfs runs with FAT32 cache mode (used for large
filesystems that cannot be mmap'd), a detected FAT header correction
was written into the in-memory buffer but the corresponding cache
entry (fat32_cache_allentries[0]) was never marked dirty.  As a
result, fat_flush_fat32_cache_entry() skipped it, the corrected
bytes were never written to disk, and copyfat() propagated the
uncorrected on-disk data to all backup FAT copies.  Every subsequent
fsck run would repeat the same "FAT starts with odd byte sequence /
FIXED" cycle indefinitely.

Fix by marking fat32_cache_allentries[0].dirty = true after applying
the in-memory correction, ensuring the chunk is flushed before
copyfat() runs.

Approved by:    re (cperciva)
Obtained from:  https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/4047981


    [2 lines not shown]
DeltaFile
+11-0sbin/fsck_msdosfs/fat.c
+11-01 files

LLVM/project 25915dellvm/lib/Target/WebAssembly WebAssemblyGISel.td, llvm/lib/Target/WebAssembly/GISel WebAssemblyLegalizerInfo.cpp

Implement saturating fp to int
DeltaFile
+424-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/fptoui_sat.ll
+418-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/fptosi_sat.ll
+13-0llvm/lib/Target/WebAssembly/WebAssemblyGISel.td
+2-2llvm/lib/Target/WebAssembly/GISel/WebAssemblyLegalizerInfo.cpp
+857-24 files

LLVM/project 305045bllvm/lib/Target/WebAssembly/GISel WebAssemblyLegalizerInfo.cpp, llvm/test/CodeGen/WebAssembly/GlobalISel/instructions is_fpclass.ll fcmp.ll

Implement floating-point comparisons
DeltaFile
+490-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/is_fpclass.ll
+436-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/fcmp.ll
+308-0llvm/lib/Target/WebAssembly/GISel/WebAssemblyLegalizerInfo.cpp
+225-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/fminimumnum.ll
+219-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/fmaximumnum.ll
+55-0llvm/test/CodeGen/WebAssembly/GlobalISel/instructions/fmaxnum.ll
+1,733-03 files not shown
+1,852-09 files