Skip to content

Commit ed4af56

Browse files
authored
Merge branch 'main' into use-error-instead-of-commandreturnobject
2 parents f3a12ba + dbabad0 commit ed4af56

File tree

427 files changed

+15754
-11735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

427 files changed

+15754
-11735
lines changed

.github/new-prs-labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,9 @@ llvm:regalloc:
730730
lldb:
731731
- lldb/**
732732

733+
lldb-dap:
734+
- lldb/tools/lldb-dap/**
735+
733736
backend:AMDGPU:
734737
- '**/*amdgpu*'
735738
- '**/*AMDGPU*'

.github/workflows/clang-tests.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Commit Access Greeter
2+
3+
on:
4+
issues:
5+
types:
6+
- labeled
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
commit-access-greeter:
13+
permissions:
14+
issues: write
15+
if: >-
16+
github.repository_owner == 'llvm' &&
17+
github.event.label.name == 'infra:commit-access-request'
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
21+
with:
22+
sparse-checkout: llvm/utils/git/
23+
24+
- name: Setup Automation Script
25+
working-directory: ./llvm/utils/git/
26+
run: |
27+
pip install --require-hashes -r requirements.txt
28+
29+
- name: Add comments to issue
30+
working-directory: ./llvm/utils/git/
31+
env:
32+
LABEL_NAME: ${{ github.event.label.name }}
33+
GITHUB_TOKEN: ${{ github.token }}
34+
ISSUE_NUMBER: ${{ github.event.issue.number }}
35+
run: |
36+
python3 ./github-automation.py \
37+
--token $GITHUB_TOKEN \
38+
commit-request-greeter \
39+
--issue-number $ISSUE_NUMBER

.github/workflows/libclc-tests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/lld-tests.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/lldb-tests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/llvm-tests.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ on:
1111
paths:
1212
- 'llvm/**'
1313
- '.github/workflows/llvm-tests.yml'
14-
- '.github/workflows/llvm-project-tests.yml'
1514
pull_request:
1615
branches:
1716
- 'release/**'
1817
paths:
1918
- 'llvm/**'
2019
- '.github/workflows/llvm-tests.yml'
21-
- '.github/workflows/llvm-project-tests.yml'
2220

2321
concurrency:
2422
# Skip intermediate builds: always.
@@ -27,14 +25,6 @@ concurrency:
2725
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2826

2927
jobs:
30-
check-all:
31-
if: github.repository_owner == 'llvm'
32-
name: Build and Test
33-
uses: ./.github/workflows/llvm-project-tests.yml
34-
with:
35-
build_target: check-all
36-
projects: clang;lld;libclc;lldb
37-
3828
abi-dump-setup:
3929
if: github.repository_owner == 'llvm'
4030
runs-on: ubuntu-latest

.github/workflows/premerge.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
push:
1111
branches:
1212
- 'main'
13+
- 'release/**'
1314

1415
jobs:
1516
premerge-checks-linux:
@@ -132,3 +133,72 @@ jobs:
132133
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
133134
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
134135
136+
permerge-check-macos:
137+
runs-on: macos-14
138+
concurrency:
139+
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
140+
cancel-in-progress: true
141+
if: >-
142+
(startswith(github.ref_name, 'release/') ||
143+
startswith(github.base_ref, 'refs/heads/release/'))
144+
steps:
145+
- name: Checkout LLVM
146+
uses: actions/checkout@v4
147+
with:
148+
fetch-depth: 2
149+
- name: Setup ccache
150+
uses: hendrikmuhs/[email protected]
151+
with:
152+
max-size: "2000M"
153+
- name: Install Ninja
154+
uses: llvm/actions/install-ninja@main
155+
- name: Build and Test
156+
run: |
157+
modified_files=$(git diff --name-only HEAD~1...HEAD)
158+
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort -u)
159+
160+
echo $modified_files
161+
echo $modified_dirs
162+
163+
. ./.ci/compute-projects.sh
164+
165+
all_projects="clang clang-tools-extra lld lldb llvm mlir"
166+
modified_projects="$(keep-modified-projects ${all_projects})"
167+
168+
# We have to disable the runtimes builds due to https://github.com/llvm/llvm-project/issues/90568
169+
# and the lldb tests depend on libcxx, so we need to skip them.
170+
mac_check_targets=$(check-targets ${modified_projects} | sort | uniq | tr '\n' ' ' | sed -e 's/check-lldb //g')
171+
mac_projects=$(add-dependencies ${modified_projects} | sort | uniq | tr '\n' ' ')
172+
173+
mac_runtimes_to_test=$(compute-runtimes-to-test ${modified_projects})
174+
mac_runtime_check_targets=$(check-targets ${mac_runtimes_to_test} | sort | uniq | tr '\n' ' ')
175+
mac_runtimes=$(echo ${mac_runtimes_to_test} | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
176+
177+
if [[ "${mac_projects}" == "" ]]; then
178+
echo "No projects to build"
179+
exit 0
180+
fi
181+
182+
echo "Projects to test: ${modified_projects}"
183+
echo "Runtimes to test: ${mac_runtimes_to_test}"
184+
echo "Building projects: ${mac_projects}"
185+
echo "Running project checks targets: ${mac_check_targets}"
186+
echo "Building runtimes: ${mac_runtimes}"
187+
echo "Running runtimes checks targets: ${mac_runtime_check_targets}"
188+
189+
# -DLLVM_DISABLE_ASSEMBLY_FILES=ON is for
190+
# https://github.com/llvm/llvm-project/issues/81967
191+
# Disable sharding in lit so that the LIT_XFAIL environment var works.
192+
cmake -G Ninja \
193+
-B build \
194+
-S llvm \
195+
-DLLVM_ENABLE_PROJECTS="$(echo ${mac_projects} | tr ' ' ';')" \
196+
-DLLVM_DISABLE_ASSEMBLY_FILES=ON \
197+
-DCMAKE_BUILD_TYPE=Release \
198+
-DLLDB_INCLUDE_TESTS=OFF \
199+
-DLLVM_ENABLE_ASSERTIONS=ON \
200+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
201+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
202+
203+
# The libcxx tests fail, so we are skipping the runtime targets.
204+
ninja -C build $mac_check_targets

clang-tools-extra/include-cleaner/lib/WalkAST.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "clang/AST/Type.h"
2323
#include "clang/AST/TypeLoc.h"
2424
#include "clang/Basic/IdentifierTable.h"
25+
#include "clang/Basic/OperatorKinds.h"
2526
#include "clang/Basic/SourceLocation.h"
2627
#include "clang/Basic/Specifiers.h"
2728
#include "llvm/ADT/STLExtras.h"
@@ -32,6 +33,11 @@
3233

3334
namespace clang::include_cleaner {
3435
namespace {
36+
bool isOperatorNewDelete(OverloadedOperatorKind OpKind) {
37+
return OpKind == OO_New || OpKind == OO_Delete || OpKind == OO_Array_New ||
38+
OpKind == OO_Array_Delete;
39+
}
40+
3541
using DeclCallback =
3642
llvm::function_ref<void(SourceLocation, NamedDecl &, RefType)>;
3743

@@ -158,7 +164,15 @@ class ASTWalker : public RecursiveASTVisitor<ASTWalker> {
158164
// the container decl instead, which is preferred as it'll handle
159165
// aliases/exports properly.
160166
if (!FD->isCXXClassMember() && !llvm::isa<EnumConstantDecl>(FD)) {
161-
report(DRE->getLocation(), FD);
167+
// Global operator new/delete [] is available implicitly in every
168+
// translation unit, even without including any explicit headers. So treat
169+
// those as ambigious to not force inclusion in TUs that transitively
170+
// depend on those.
171+
RefType RT =
172+
isOperatorNewDelete(FD->getDeclName().getCXXOverloadedOperator())
173+
? RefType::Ambiguous
174+
: RefType::Explicit;
175+
report(DRE->getLocation(), FD, RT);
162176
return true;
163177
}
164178
// If the ref is without a qualifier, and is a member, ignore it. As it is

0 commit comments

Comments
 (0)