LLVM/project 825943e.github/workflows libcxx-build-and-test.yaml, libcxx/utils/ci run-buildbot

[libc++] Run macOS buildbot under xcrun (#167072)

This ensures that run-buildbot can find the appropriate build tools
without having to go through a bunch of hoops inside run-buildbot
itself. When we eventually run the bootstrapping build on macOS, it also
allows the bootstrapped Clang to find the SDK headers it requires.

This also allows simplifying run-buildbot a bunch since we should be
able to find build tools in the current $PATH.
DeltaFile
+35-60libcxx/utils/ci/run-buildbot
+1-1.github/workflows/libcxx-build-and-test.yaml
+36-612 files

LLVM/project 070f331clang/lib/Driver/ToolChains Gnu.cpp

[Driver] Remove extraneous c_str() (NFC) (#167156)

Note that addMultilibFlag takes StringRef for its second parameter.

Identified with readability-redundant-string-cstr.
DeltaFile
+2-2clang/lib/Driver/ToolChains/Gnu.cpp
+2-21 files

LLVM/project 6b42c91llvm/lib/Target/WebAssembly WebAssemblyMachineFunctionInfo.h

[WebAssembly] Clean up CustomMappingTraits<BBNumberMap> (NFC) (#167155)

This patch does two things for readability:

- Use structured bindings.
- Remove extraneous .c_str().

Note that YamlIO.mapRequired takes StringRef as the key type.  As
such, we can implicitly construct StringRef from std::string.
DeltaFile
+2-2llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
+2-21 files

LLVM/project 1e18747llvm/lib/ObjectYAML CodeViewYAMLSymbols.cpp DXContainerYAML.cpp

[ObjectYAML] Remove redundant .str().c_str() (NFC) (#167154)

We can drop .str().c_str() here because all of the following are of
type StringRef:

- E.Name
- the second parameter of llvm::yaml::IO::enumCase
- the second parameter of llvm::yaml::IO::bitSetCase

Identified with readability-redundant-string-cstr.
DeltaFile
+14-24llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+15-15llvm/lib/ObjectYAML/DXContainerYAML.cpp
+29-392 files

LLVM/project ae1622allvm/lib/Target/NVPTX NVPTXGenericToNVVM.cpp NVPTX.h

[NVPTX] Remove redundant declarations (NFC) (#167153)

initializeNVPTXCtorDtorLoweringLegacyPass is declared twice in
NVPTX.h.

initializeGenericToNVVMLegacyPassPass is declared in NVPTX.h.

Identified with readability-redundant-declaration.
DeltaFile
+0-4llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
+0-1llvm/lib/Target/NVPTX/NVPTX.h
+0-52 files

LLVM/project c06f864llvm/lib/ExecutionEngine/Orc/TargetProcess LibraryScanner.cpp

[ExecutionEngine] Use StringRef::starts_with (NFC) (#167152)

Identified with modernize-use-starts-ends-with.
DeltaFile
+2-2llvm/lib/ExecutionEngine/Orc/TargetProcess/LibraryScanner.cpp
+2-21 files

LLVM/project 18b8e3bllvm/include/llvm/ADT StringSwitch.h

[ADT] Add a missing std::move to StringSwitch::EndsWithLower (#167151)

All others seem to use std::move in StringSwitch.
DeltaFile
+1-1llvm/include/llvm/ADT/StringSwitch.h
+1-11 files

LLVM/project ace77c2clang-tools-extra/clang-tidy/readability SuspiciousCallArgumentCheck.cpp SimplifyBooleanExprCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (9/N) (#167124)

DeltaFile
+26-26clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
+26-25clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
+19-18clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
+12-10clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
+8-8clang-tools-extra/clang-tidy/readability/OperatorsRepresentationCheck.cpp
+5-5clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
+96-9215 files not shown
+130-12321 files

LLVM/project 5896a25clang-tools-extra/clang-tidy/bugprone NotNullTerminatedResultCheck.cpp NarrowingConversionsCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (13/N) (#167130)

DeltaFile
+48-46clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
+20-20clang-tools-extra/clang-tidy/bugprone/NarrowingConversionsCheck.cpp
+16-14clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp
+8-7clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp
+6-6clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp
+5-5clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp
+103-9813 files not shown
+135-12719 files

LLVM/project 385dbc1clang-tools-extra/clang-tidy/bugprone EasilySwappableParametersCheck.cpp ArgumentCommentCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (12/N) (#167129)

DeltaFile
+54-49clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
+23-20clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
+13-12clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp
+7-7clang-tools-extra/clang-tidy/bugprone/DefaultOperatorNewOnOveralignedTypeCheck.cpp
+5-4clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
+4-4clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
+106-9615 files not shown
+132-12121 files

LLVM/project 545c302clang-tools-extra/clang-tidy/readability IdentifierNamingCheck.cpp ImplicitBoolConversionCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (8/N) (#167123)

DeltaFile
+47-44clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+16-16clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+13-13clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
+10-10clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStaticCheck.cpp
+11-7clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
+8-8clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
+105-9816 files not shown
+151-14422 files

LLVM/project 01bea27clang-tools-extra/clang-tidy/modernize LoopConvertCheck.cpp UseAutoCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (10/N) (#167127)

DeltaFile
+24-23clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
+23-20clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+19-19clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+18-18clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
+16-16clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp
+13-11clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp
+113-10715 files not shown
+177-16521 files

LLVM/project ce7f9f9llvm/docs Coroutines.rst AMDGPUUsage.rst

[llvm] Proofread *.rst (#167108)

This patch is limited to single-word replacements to fix spelling
and/or grammar to ease the review process.  Punctuation and markdown
fixes are specifically excluded.
DeltaFile
+6-6llvm/docs/Coroutines.rst
+5-5llvm/docs/AMDGPUUsage.rst
+2-2llvm/docs/CompileCudaWithLLVM.rst
+2-2llvm/docs/GetElementPtr.rst
+2-2llvm/docs/Docker.rst
+2-2llvm/docs/BranchWeightMetadata.rst
+19-1911 files not shown
+32-3217 files

LLVM/project 2844d86mlir/lib/Dialect/Affine/Utils Utils.cpp, mlir/lib/Dialect/Linalg/Transforms TilingInterfaceImpl.cpp

[mlir] Remove unused local variables (NFC) (#167107)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-3mlir/lib/Dialect/Affine/Utils/Utils.cpp
+0-2mlir/lib/Dialect/Linalg/Transforms/TilingInterfaceImpl.cpp
+0-1mlir/lib/Dialect/SCF/Transforms/ParallelForToNestedFors.cpp
+0-1mlir/lib/Dialect/OpenACC/Transforms/ACCImplicitData.cpp
+0-74 files

LLVM/project 0028ef6llvm/lib/CAS UnifiedOnDiskCache.cpp, llvm/lib/CodeGen WindowsSecureHotPatching.cpp

[llvm] Remove unused local variables (NFC) (#167106)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-2llvm/lib/CAS/UnifiedOnDiskCache.cpp
+0-2llvm/lib/CodeGen/WindowsSecureHotPatching.cpp
+0-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+0-1llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
+0-1llvm/lib/Transforms/IPO/SampleProfile.cpp
+0-85 files

LLVM/project ee0652bflang/lib/Optimizer/CodeGen LowerRepackArrays.cpp, flang/lib/Optimizer/OpenMP DoConcurrentConversion.cpp

[flang] Remove unused local variables (NFC) (#167105)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-3flang/lib/Optimizer/OpenMP/DoConcurrentConversion.cpp
+0-1flang/lib/Optimizer/CodeGen/LowerRepackArrays.cpp
+0-1flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
+0-53 files

LLVM/project d838ca2clang-tools-extra/clang-doc HTMLMustacheGenerator.cpp

[clang-doc] Remove an unused local variable (NFC) (#167104)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-1clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+0-11 files

LLVM/project 6313830lldb/include/lldb lldb-private-interfaces.h

Fix missing include from #166664
DeltaFile
+1-0lldb/include/lldb/lldb-private-interfaces.h
+1-01 files

LLVM/project c6ffc93clang-tools-extra/clang-tidy/bugprone VirtualNearMissCheck.cpp TooSmallLoopVariableCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (14/N) (#167131)

DeltaFile
+20-20clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.cpp
+16-16clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp
+10-10clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp
+10-8clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
+7-5clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp
+4-4clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
+67-6313 files not shown
+99-9219 files

LLVM/project 6deb50dclang-tools-extra/clang-tidy/modernize UseTrailingReturnTypeCheck.cpp UseOverrideCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (11/N) (#167128)

DeltaFile
+26-25clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
+16-15clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp
+14-13clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+5-5clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
+5-5clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
+4-3clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
+70-669 files not shown
+87-8215 files

LLVM/project fa98c8dutils/bazel/llvm-project-overlay/libc/test/src/stdlib BUILD.bazel

Fix bazel build for #166719
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+1-01 files

LLVM/project b9ea93cllvm/lib/Transforms/InstCombine InstructionCombining.cpp, llvm/test/Transforms/InstCombine binop-select.ll

[InstCombine] Fold operation into select, when one operand is zext of select's condition (#166816)

Proof https://alive2.llvm.org/ce/z/oCQyTG
DeltaFile
+6-23llvm/test/Transforms/InstCombine/binop-select.ll
+3-0llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+9-232 files

LLVM/project 21c1b78clang/lib/CodeGen/Targets AArch64.cpp, clang/test/CodeGen arm64-microsoft-arguments.cpp

fix: C++ empty record with align lead to va_list out of sync (#72197)

Fix AArch64 argument passing for C++ empty classes with large explicitly specified  alignment

reproducer: https://godbolt.org/z/qsze8fqra 
rel issue: https://github.com/llvm/llvm-project/issues/69872 
rel commit: https://github.com/llvm/llvm-project/commit/1711cc930bda8d27e87a2092bd220c18e4600c98
DeltaFile
+19-1clang/test/CodeGen/AArch64/args.cpp
+6-4clang/test/CodeGen/AArch64/struct-coerce-using-ptr.cpp
+6-3clang/lib/CodeGen/Targets/AArch64.cpp
+2-2clang/test/CodeGen/arm64-microsoft-arguments.cpp
+1-1clang/test/CodeGenCXX/arm64-darwinpcs.cpp
+1-1clang/test/CodeGenCXX/aarch64-arguments.cpp
+35-121 files not shown
+36-127 files

LLVM/project a0e222fllvm/lib/Transforms/Utils SimplifyCFG.cpp, llvm/test/Transforms/SimplifyCFG switch_create.ll switch-transformations-no-lut.ll

[SimplifyCFG] Simplify uncond br with icmp & select (#165580)

Previously, SimplifyCFG only simplified unconditional branches when they
met a pattern (`swicth` -> `icmp` -> `br` -> `phi`) as follows:
```LLVM
   switch i8 %A, label %DEFAULT [ i8 1, label %end    i8 2, label %end ]
DEFAULT:
   %tmp = icmp eq i8 %A, 92
   br label %end
end:
   ... = phi i1 [ true, %entry ], [ %tmp, %DEFAULT ], [ true, %entry ]
```

This PR supports a new and more generic pattern (`switch` -> `icmp` ->
`select` -> `br` -> `phi` ) to simplify unconditional branches as
follows:
```LLVM
; BEFORE
case1:

    [36 lines not shown]
DeltaFile
+111-22llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+130-0llvm/test/Transforms/SimplifyCFG/switch_create.ll
+2-3llvm/test/Transforms/SimplifyCFG/switch-transformations-no-lut.ll
+2-2llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table.ll
+245-274 files

LLVM/project ffb5831libc/include/llvm-libc-macros netinet-in-macros.h

[libc] add various macros relate to *ADDR* (#164830)

This patch adds 4 macros in the `netinet/in.h` header, as specified by
POSIX standards.
DeltaFile
+9-0libc/include/llvm-libc-macros/netinet-in-macros.h
+9-01 files

LLVM/project 3226a5fclang/lib/Headers avx512vlcdintrin.h avx512cdintrin.h

[Headers][X86] avx512cd - move constexpr to the end of the function attribute lists. NFC. (#166968)

Consistent with how we order the attributes in other headers

Makes it easier to compare constexpr/non-constexpr attribute defines
DeltaFile
+6-6clang/lib/Headers/avx512vlcdintrin.h
+2-2clang/lib/Headers/avx512cdintrin.h
+8-82 files

LLVM/project 8f2b167clang-tools-extra/docs/clang-tidy/checks/bugprone incorrect-enable-shared-from-this.rst crtp-constructor-accessibility.rst, clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines pro-bounds-avoid-unchecked-container-access.rst

[clang-tidy][NFC] Remove trailing whitespaces in documentation (#167103)

This is part of the codebase cleanup described in
[#167098](https://github.com/llvm/llvm-project/issues/167098)
DeltaFile
+26-26clang-tools-extra/docs/clang-tidy/checks/objc/nsdate-formatter.rst
+5-5clang-tools-extra/docs/clang-tidy/checks/bugprone/incorrect-enable-shared-from-this.rst
+5-5clang-tools-extra/docs/clang-tidy/checks/portability/template-virtual-member-function.rst
+4-4clang-tools-extra/docs/clang-tidy/checks/modernize/min-max-use-initializer-list.rst
+4-4clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-avoid-unchecked-container-access.rst
+3-3clang-tools-extra/docs/clang-tidy/checks/bugprone/crtp-constructor-accessibility.rst
+47-4727 files not shown
+88-8833 files

LLVM/project c8ab3b7clang-tools-extra/clang-tidy ClangTidy.cpp, clang-tools-extra/clang-tidy/readability QualifiedAutoCheck.cpp

[clang-tidy][NFC] Run clang-format-22 over clang-tidy (#167122)

DeltaFile
+1-1clang-tools-extra/clang-tidy/ClangTidy.cpp
+0-1clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
+1-22 files

LLVM/project 577b519clang-tools-extra/clang-tidy/utils ExceptionAnalyzer.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix `bugprone-exception-escape` not diagnosing throws in argument lists (#165955)

Fixes #165766.
DeltaFile
+52-1clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape.cpp
+15-11clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
+3-1clang-tools-extra/docs/ReleaseNotes.rst
+70-133 files

LLVM/project 8d950d2clang-tools-extra/clang-tidy/cppcoreguidelines ProBoundsAvoidUncheckedContainerAccessCheck.cpp ProBoundsAvoidUncheckedContainerAccess.cpp, clang-tools-extra/clang-tidy/performance UnnecessaryCopyInitializationCheck.cpp UnnecessaryCopyInitialization.cpp

[clang-tidy][NFC] Add missing "Check" suffix to filenames in clang-tidy checks (#166889)

This is part of the codebase cleanup described in
[#166753](https://github.com/llvm/llvm-project/issues/166753).
DeltaFile
+393-0clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitializationCheck.cpp
+0-393clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
+263-0clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsAvoidUncheckedContainerAccessCheck.cpp
+0-262clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsAvoidUncheckedContainerAccess.cpp
+179-0clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStaticCheck.cpp
+0-178clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
+835-83340 files not shown
+1,724-1,69446 files