LLVM/project 226765blibcxx/utils/libcxx/test/features availability.py

[NFC] [test] [libcxx] Fix invalid escape sequences (#168636)

```
>>> "_target-has-llvm-21 || target={{.+}}-apple-macosx{{26.[0-9](.\d+)?}}" == r"_target-has-llvm-21 || target={{.+}}-apple-macosx{{26.[0-9](.\\
d+)?}}"
<python-input-6>:1: SyntaxWarning: invalid escape sequence '\d'
True
>>> "_target-has-llvm-20 || target={{.+}}-apple-macosx{{15.[4-9](.\d+)?}}" == r"_target-has-llvm-20 || target={{.+}}-apple-macosx{{15.[4-9](.\\
d+)?}}"
<python-input-7>:1: SyntaxWarning: invalid escape sequence '\d'
True
>>> "_target-has-llvm-19 || target={{.+}}-apple-macosx{{15.[0-3](.\d+)?}}" == r"_target-has-llvm-19 || target={{.+}}-apple-macosx{{15.[0-3](.\\
d+)?}}"
<python-input-8>:1: SyntaxWarning: invalid escape sequence '\d'
True
>>> "_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.\d+)?}}" == r"_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.\\
d+)?}}"
<python-input-9>:1: SyntaxWarning: invalid escape sequence '\d'
True
```
DeltaFile
+4-4libcxx/utils/libcxx/test/features/availability.py
+4-41 files

LLVM/project f6fcb2allvm/include/llvm/ADT MapVector.h DenseMap.h, llvm/unittests/ADT MapVectorTest.cpp DenseMapTest.cpp

ADT: Complete the at() methods for DenseMap and MapVector

Make it easier to use these containers as drop-in replacements for
std::map.

commit-id:8b1d1826
DeltaFile
+18-4llvm/include/llvm/ADT/MapVector.h
+15-0llvm/unittests/ADT/MapVectorTest.cpp
+8-0llvm/include/llvm/ADT/DenseMap.h
+8-0llvm/unittests/ADT/DenseMapTest.cpp
+49-44 files

LLVM/project 6b75b44libcxx/test/std/utilities/any/any.nonmembers/any.cast any_cast_reference.pass.cpp any_cast_pointer.pass.cpp

[libc++][any][NFC] Reformat and refactor any_cast tests (#169057)

...in preparation for https://github.com/llvm/llvm-project/pull/168826
as requested in the review.

Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+235-238libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
+109-108libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp
+24-36libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.verify.cpp
+19-22libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.verify.cpp
+15-15libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
+10-10libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
+412-4296 files

LLVM/project 3841e7dclang/lib/AST/ByteCode Interp.cpp InterpFrame.h, clang/test/AST/ByteCode new-delete.cpp

[clang][bytecode] Don't call getThis() on the bottom function frame (#169044)

We can't access the calling frame in that case.

Fixes https://github.com/llvm/llvm-project/issues/169032
DeltaFile
+12-0clang/test/AST/ByteCode/new-delete.cpp
+2-1clang/lib/AST/ByteCode/Interp.cpp
+2-0clang/lib/AST/ByteCode/InterpFrame.h
+16-13 files

LLVM/project 8918921lldb/source/Plugins/Language/CPlusPlus LibStdcpp.cpp, lldb/source/Plugins/Language/ObjC NSSet.cpp

[NFC][lldb] Remove duplicated checks (#169093)

Removed duplicated checks reported by cppcheck
DeltaFile
+0-3lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
+0-2lldb/source/Plugins/Language/ObjC/NSSet.cpp
+0-52 files

LLVM/project cc7e206lldb/source/Target Target.cpp, lldb/source/Utility StringExtractorGDBRemote.cpp

[lldb] Remove redundant declarations (NFC) (#169003)

In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
DeltaFile
+0-3lldb/source/Utility/StringExtractorGDBRemote.cpp
+0-2lldb/source/Target/Target.cpp
+0-52 files

LLVM/project b6dadc7clang/lib/CodeGen CGOpenMPRuntime.cpp, clang/test/OpenMP target_firstprivate_pointer_codegen.cpp target_map_codegen_01.cpp

Revert "[OpenMP] Fix firstprivate pointer handling in target regions" (#169143)

Reverts llvm/llvm-project#167879

This PR is causing assertions in the check-offload tests:

https://lab.llvm.org/staging/#/builders/105
https://lab.llvm.org/staging/#/builders/105/builds/37057
DeltaFile
+0-169clang/test/OpenMP/target_firstprivate_pointer_codegen.cpp
+12-64clang/lib/CodeGen/CGOpenMPRuntime.cpp
+3-3clang/test/OpenMP/target_map_codegen_01.cpp
+2-2clang/test/OpenMP/target_defaultmap_codegen_01.cpp
+2-2clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp
+2-2clang/test/OpenMP/target_map_codegen_09.cpp
+21-24212 files not shown
+34-25618 files

LLVM/project 8bdbc57lldb/packages/Python/lldbsuite/test decorators.py, lldb/test/Shell/helper toolchain.py

[NFC][LLDB] Make it possible to detect if the compiler used in tests supports -fbounds-safety (#169112)

This patch makes it possible to detect in LLDB shell and API tests if
`-fbounds-safety` is supported by the compiler used for testing. The
motivation behind this is to allow upstreaming
https://github.com/swiftlang/llvm-project/pull/11835 but with the tests
disabled in upstream because the full implementation of -fbounds-safety
isn't available in Clang yet.

For shell tests when -fbounds-safety is available the
`clang-bounds-safety` feature is available which means tests can be
annotated with `# REQUIRES: clang-bounds-safety`.

API tests that need -fbounds-safety support in the compiler can use the
new `@skipUnlessBoundsSafety` decorator.

rdar://165225507
DeltaFile
+30-0llvm/utils/lit/lit/llvm/config.py
+10-0lldb/packages/Python/lldbsuite/test/decorators.py
+3-0lldb/test/Shell/helper/toolchain.py
+43-03 files

LLVM/project 4ff4d68llvm/lib/IR ReplaceConstant.cpp, llvm/test/CodeGen/AMDGPU same-lds-variable-multiple-use-in-one-phi-node.ll

[ReplaceConstant] Don't create instructions for the same constant multiple times in the same basic block

Fixes #167500.
DeltaFile
+51-0llvm/test/CodeGen/AMDGPU/same-lds-variable-multiple-use-in-one-phi-node.ll
+9-1llvm/lib/IR/ReplaceConstant.cpp
+60-12 files

LLVM/project 54a4da9clang/lib/AST DeclCXX.cpp ASTContext.cpp, clang/lib/CodeGen CGClass.cpp MicrosoftCXXABI.cpp

Revert "Reland [MS][clang] Add support for vector deleting destructors" (#169116)

This reverts 4d10c1165442cbbbc0017b48fcdd7dae1ccf3678 and its two
dependent commits: e6b9805b574bb5c90263ec7fbcb94df76d2807a4 and
c243406a695ca056a07ef4064b0f9feee7685320, see discussion in
https://github.com/llvm/llvm-project/pull/165598#issuecomment-3563825509.
DeltaFile
+0-336clang/test/CodeGenCXX/microsoft-vector-deleting-dtors.cpp
+1-94clang/lib/CodeGen/CGClass.cpp
+10-63clang/lib/AST/DeclCXX.cpp
+14-56clang/lib/CodeGen/MicrosoftCXXABI.cpp
+13-53clang/lib/Serialization/ASTReaderDecl.cpp
+0-65clang/lib/AST/ASTContext.cpp
+38-66754 files not shown
+166-1,27460 files

LLVM/project 58e2ddelld/MachO SymbolTable.cpp, lld/test/MachO weak-alias-override.s

[lld:MachO] Allow independent override of weak symbols aliased via .set (#167825)

Currently, if multiple external weak symbols are defined at the same
address in an object file (e.g., by using the .set assembler directive
to alias them to a single weak variable), ld64.lld treats them as a
single unit. When any one of these symbols is overridden by a strong
definition, all of the original weak symbols resolve to the strong
definition.

This patch changes the behavior in `transplantSymbolsAtOffset`. When a
weak symbol is being replaced by a strong one, only non-external (local)
symbols at the same offset are moved to the new symbol's section. Other
*external* symbols are no longer transplanted.

This allows each external weak symbol to be overridden independently.
This behavior is consistent with Apple's ld-classic, but diverges from
ld-prime in one case, as noted on
https://github.com/llvm/llvm-project/issues/167262 (this discrepancy has
recently been reported to Apple).

    [18 lines not shown]
DeltaFile
+97-0lld/test/MachO/weak-alias-override.s
+18-17lld/MachO/SymbolTable.cpp
+115-172 files

LLVM/project 99120bb.ci premerge_advisor_explain.py

[CI] Make Premerge only Comment if Tests Failed (#169102)

Before, we were unconditionally writing a message. After this patch, we
only write a message when the tests failed, or there is already an
existing comment. This is how this workflow was intended to work
originally, but is not how it ended up working, mostly due to my
misconceptions around how the existing code formatter pass handled this
case (we need to actually not write out any comments, not write out a
specific message).
DeltaFile
+30-32.ci/premerge_advisor_explain.py
+30-321 files

LLVM/project dc3c5a5utils/bazel .bazelrc

[bazel] Remove old config option (#169133)

The default of this has been flipped since we're on 8.x
DeltaFile
+0-3utils/bazel/.bazelrc
+0-31 files

LLVM/project 5bf7e8aclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuiltin.cpp

[CIR] Upstream overflow builtins (#166643)

This implements the builtins that handle overflow.

This fixes issue https://github.com/llvm/llvm-project/issues/163888
DeltaFile
+374-0clang/test/CIR/CodeGen/builtins-overflow.cpp
+171-2clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+114-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+76-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+735-24 files

LLVM/project 13011felldb/include/lldb/Utility NonNullSharedPtr.h

[lldb] Remove Base::unique from NonNullSharedPtr (#169130)

It seems like this fails on macOS with C++20
DeltaFile
+0-1lldb/include/lldb/Utility/NonNullSharedPtr.h
+0-11 files

LLVM/project 136c9daclang/lib/CIR/CodeGen CIRGenCXX.cpp, clang/lib/CIR/Dialect/Transforms LoweringPrepare.cpp

[CIR] Implement global array dtor support (#169070)

This implements handling to destroy global arrays that require
destruction. Unlike classic codegen, CIR emits the destructor loop into
a 'dtor' region associated with the global array variable. Later, during
LoweringPrepare, this code is moved into a helper function and a call to
__cxa_atexit arranges for it to be called during the shared object
shutdown.
DeltaFile
+111-12clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+101-5clang/test/CIR/CodeGen/global-init.cpp
+19-7clang/lib/CIR/CodeGen/CIRGenCXX.cpp
+231-243 files

LLVM/project 677fbf8clang/test/CIR/CodeGen/X86 avx512f-builtins.c avx-builtins.c

[CIR] Upstream CIR codegen for undef x86 builtins (#167945)

DeltaFile
+79-0clang/test/CIR/CodeGen/X86/avx512f-builtins.c
+76-0clang/test/CIR/CodeGen/X86/avx-builtins.c
+66-0clang/test/CIR/CodeGen/X86/avx512fp16-builtins.c
+47-0clang/test/CIR/CodeGen/X86/avx10_2bf16-builtins.c
+37-0clang/test/CIR/CodeGen/X86/sse2-builtins.c
+28-0clang/test/CIR/CodeGen/X86/avx10_2_512bf16-builtins.c
+333-02 files not shown
+356-48 files

LLVM/project 7e6c913lldb/unittests/Editline EditlineTest.cpp

[lldb] Fix EditlineTest closing files multiple times. (#169100)

This updates the EditlineTest to use `lldb::FileSP` to ensure the
associated FDs are only closed a single time.

Currently, there is some confusion between the `FilePointer`,
`PseudoTerminal` and `LockableStreamFile` about when the files are
closed resulting in a crash in some due to a `fflush` on a closed file.
DeltaFile
+28-58lldb/unittests/Editline/EditlineTest.cpp
+28-581 files

LLVM/project 9fa7627llvm/include/llvm/CodeGen SDPatternMatch.h, llvm/unittests/CodeGen SelectionDAGPatternMatchTest.cpp

DAG: Handle poison in m_Undef (#168288)

DeltaFile
+3-1llvm/include/llvm/CodeGen/SDPatternMatch.h
+2-0llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
+5-12 files

LLVM/project d7307f4compiler-rt/test/orc/TestCases/Darwin/x86-64 objc-imageinfo.S

[ORC] Fix obj-imageinfo.S on X86 Darwin with Internal Shell (#169104)

d464c99f595b69d3a34b361b6a935e803c60d308 fixes this test on AArch64
Darwin, but I did not realize that there was another X86 version of the
test. This patch also updates the X86 version of the test in a similar
manner.
DeltaFile
+3-1compiler-rt/test/orc/TestCases/Darwin/x86-64/objc-imageinfo.S
+3-11 files

LLVM/project bf6e3f1clang-tools-extra/include-cleaner/test lit.cfg.py

[include-cleaner] Use lit internal shell by default for tests (#169092)

All of the tests seem to be compatible with the internal shell and the
internal shell is typically faster by 10-15% on top of providing a
better debugging experience.
DeltaFile
+14-1clang-tools-extra/include-cleaner/test/lit.cfg.py
+14-11 files

LLVM/project 9c35da1llvm/include/llvm/MC MCSymbolGOFF.h, llvm/lib/CodeGen TargetLoweringObjectFileImpl.cpp

Remove LDAttr/ERAttr and initAttributes.
DeltaFile
+25-21llvm/lib/MC/MCSymbolGOFF.cpp
+6-24llvm/include/llvm/MC/MCSymbolGOFF.h
+13-12llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+0-9llvm/lib/MC/MCGOFFStreamer.cpp
+4-3llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+48-695 files

LLVM/project 3d5191fllvm/unittests/Support SignalsTest.cpp

[test][Support] Disable SignalsTest.PrintsSymbolizerMarkup (#168974)

This test checks that DSOMarkupPrinter::printDSOMarkup prints the module
and segment mappings, but that is only done if we can determine the GNU
build ID for the given object, and in many environments that is not
enabled by default (e.g. the FreeBSD Clang driver never enables it, and
various other Clang drivers only do so when ENABLE_LINKER_BUILD_ID is
opted into at configure time). GCC tends to enable it by default, and
many distributions enable it for Clang, so this has gone unnoticed for a
while, but this test has been failing on FreeBSD since its creation.

Fixes: 22b9404f09dc ("Optionally print symbolizer markup backtraces.")
See: https://github.com/llvm/llvm-project/issues/168891
DeltaFile
+6-0llvm/unittests/Support/SignalsTest.cpp
+6-01 files

LLVM/project 3a3f129llvm/include/llvm/DebugInfo/BTF BTFParser.h, llvm/lib/DebugInfo/BTF BTFParser.cpp

[llvm] Replace `OwningArrayRef` with `std::vector` in `BTFParser`

`OwningArrayRef` requires that the size and the capacity are the same. This prevents reusing memory allocations unless the size happens to be exactly the same (which is rare enough we don't even try). Switch to `std::vector` instead so that we're not repeatedly calling `new[]` and `delete[]`.
DeltaFile
+3-2llvm/lib/DebugInfo/BTF/BTFParser.cpp
+1-1llvm/include/llvm/DebugInfo/BTF/BTFParser.h
+4-32 files

LLVM/project 01164dbclang/include/clang/AST VTableBuilder.h, llvm/include/llvm/ADT ArrayRef.h

[llvm][clang] Remove `llvm::OwningArrayRef`

`OwningArrayRef` has several problems.

The naming is strange: `ArrayRef` is specifically a non-owning view, so the name means "owning non-owning view".

It has a const-correctness bug that is inherent to the interface. `OwningArrayRef<T>` publicly derives from `MutableArrayRef<T>`. This means that the following code compiles:

```c++
void const_incorrect(llvm::OwningArrayRef<int> const a) {
        a[0] = 5;
}
```

It's surprising for a non-reference type to allow modification of its elements even when it's declared `const`. However, the problems from this inheritance (which ultimately stem from the same issue as the weird name) are even worse. The following function compiles without warning but corrupts memory when called:

```c++
void memory_corruption(llvm::OwningArrayRef<int> a) {
        a.consume_front();

    [17 lines not shown]
DeltaFile
+0-23llvm/include/llvm/ADT/ArrayRef.h
+5-5llvm/include/llvm/CodeGen/PBQP/Math.h
+0-7llvm/unittests/ADT/ArrayRefTest.cpp
+4-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+2-2llvm/include/llvm/CGData/CGDataPatchItem.h
+2-2clang/include/clang/AST/VTableBuilder.h
+13-421 files not shown
+14-457 files

LLVM/project 2fcbdc1clang/test/CodeGen sanitize-type-outlined.cpp

Really fix tysan test failing on unsupported arches (#169096)

'target' is not one of the features recognized by clang tests, and the
test doesn't require X86 backend to be built. Specify the target
explicitly instead. Remove duplicate `-fsanitize=type` as well.
DeltaFile
+2-4clang/test/CodeGen/sanitize-type-outlined.cpp
+2-41 files

LLVM/project c3bc565llvm/include/llvm/DebugInfo/BTF BTFParser.h, llvm/lib/DebugInfo/BTF BTFParser.cpp

[llvm] Replace `OwningArrayRef` with `std::vector` in `BTFParser`

`OwningArrayRef` requires that the size and the capacity are the same. This prevents reusing memory allocations unless the size happens to be exactly the same (which is rare enough we don't even try). Switch to `std::vector` instead so that we're not repeatedly calling `new[]` and `delete[]`.
DeltaFile
+3-2llvm/lib/DebugInfo/BTF/BTFParser.cpp
+1-1llvm/include/llvm/DebugInfo/BTF/BTFParser.h
+4-32 files

LLVM/project 6ed829blldb/bindings/lua lua-typemaps.swig

[lldb] Restore the old behavior in lua-typemaps.swig (#169103)

Restore the original behavior (i.e. before #167764), which uses
eOpenOptionWriteOnly, not eOpenOptionReadWrite. Fixes TestLuaAPI.py.
DeltaFile
+1-1lldb/bindings/lua/lua-typemaps.swig
+1-11 files

LLVM/project dc51cf9clang-tools-extra/clang-doc/assets class-template.mustache, clang-tools-extra/test/clang-doc namespace.cpp

[clang-doc] Add definition information to class templates
DeltaFile
+4-4clang-tools-extra/test/clang-doc/namespace.cpp
+1-0clang-tools-extra/clang-doc/assets/class-template.mustache
+5-42 files

LLVM/project 79f518fclang-tools-extra/test/clang-doc namespace.cpp

[clang-doc] Add Mustache HTML output to namespace test

This patch adds Mustache HTML tests alongside the legacy HTML backend
for namespace output. This way, we can see exactly where the output
currently differs before replacing the legacy backend.

The same thing will be done for all other tests where the legacy HTML
backend is tested.
DeltaFile
+99-0clang-tools-extra/test/clang-doc/namespace.cpp
+99-01 files