Skip to content

Commit 97f2fb6

Browse files
committed
merge main into amd-staging
2 parents 35c8b5f + 5923111 commit 97f2fb6

File tree

285 files changed

+22942
-1699
lines changed

Some content is hidden

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

285 files changed

+22942
-1699
lines changed

.ci/compute_projects.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
"libc", # No Windows Support.
101101
"lldb", # TODO(issues/132800): Needs environment setup.
102102
"bolt", # No Windows Support.
103+
"libcxx",
104+
"libcxxabi",
105+
"libunwind",
103106
}
104107

105108
# These are projects that we should test if the project itself is changed but
@@ -118,6 +121,9 @@
118121
"lldb",
119122
"openmp",
120123
"polly",
124+
"libcxx",
125+
"libcxxabi",
126+
"libunwind",
121127
}
122128

123129
PROJECT_CHECK_TARGETS = {

.ci/compute_projects_test.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,14 @@ def test_llvm_windows(self):
4545
env_variables["project_check_targets"],
4646
"check-clang check-clang-tools check-lld check-llvm check-mlir check-polly",
4747
)
48-
self.assertEqual(
49-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
50-
)
48+
self.assertEqual(env_variables["runtimes_to_build"], "")
5149
self.assertEqual(
5250
env_variables["runtimes_check_targets"],
5351
"",
5452
)
5553
self.assertEqual(
5654
env_variables["runtimes_check_targets_needs_reconfig"],
57-
"check-cxx check-cxxabi check-unwind",
55+
"",
5856
)
5957

6058
def test_llvm_mac(self):
@@ -69,16 +67,14 @@ def test_llvm_mac(self):
6967
env_variables["project_check_targets"],
7068
"check-clang check-clang-tools check-lld check-llvm check-mlir",
7169
)
72-
self.assertEqual(
73-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
74-
)
70+
self.assertEqual(env_variables["runtimes_to_build"], "")
7571
self.assertEqual(
7672
env_variables["runtimes_check_targets"],
7773
"",
7874
)
7975
self.assertEqual(
8076
env_variables["runtimes_check_targets_needs_reconfig"],
81-
"check-cxx check-cxxabi check-unwind",
77+
"",
8278
)
8379

8480
def test_clang(self):
@@ -119,16 +115,14 @@ def test_clang_windows(self):
119115
self.assertEqual(
120116
env_variables["project_check_targets"], "check-clang check-clang-tools"
121117
)
122-
self.assertEqual(
123-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
124-
)
118+
self.assertEqual(env_variables["runtimes_to_build"], "")
125119
self.assertEqual(
126120
env_variables["runtimes_check_targets"],
127121
"",
128122
)
129123
self.assertEqual(
130124
env_variables["runtimes_check_targets_needs_reconfig"],
131-
"check-cxx check-cxxabi check-unwind",
125+
"",
132126
)
133127
self.assertEqual(env_variables["enable_cir"], "OFF")
134128

@@ -298,18 +292,15 @@ def test_windows_ci(self):
298292
)
299293
self.assertEqual(
300294
env_variables["runtimes_to_build"],
301-
"libcxx;libcxxabi;libunwind",
295+
"",
302296
)
303297
self.assertEqual(
304298
env_variables["runtimes_check_targets"],
305299
"",
306300
)
307-
# TODO(boomanaiden154): We should not be emitting these on Windows.
308-
# It does not currently impact anything because we do not build the
309-
# runtimes on Windows though.
310301
self.assertEqual(
311302
env_variables["runtimes_check_targets_needs_reconfig"],
312-
"check-cxx check-cxxabi check-unwind",
303+
"",
313304
)
314305

315306
def test_lldb(self):

.ci/generate_test_report_github.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
"""Script to generate a build report for Github."""
55

66
import argparse
7+
import platform
78

89
import generate_test_report_lib
910

11+
PLATFORM_TITLES = {
12+
"Windows": ":window: Windows x64 Test Results",
13+
"Linux": ":penguin: Linux x64 Test Results",
14+
}
15+
1016
if __name__ == "__main__":
1117
parser = argparse.ArgumentParser()
12-
parser.add_argument(
13-
"title", help="Title of the test report, without Markdown formatting."
14-
)
1518
parser.add_argument("return_code", help="The build's return code.", type=int)
1619
parser.add_argument("junit_files", help="Paths to JUnit report files.", nargs="*")
1720
args = parser.parse_args()
1821

1922
report = generate_test_report_lib.generate_report_from_files(
20-
args.title, args.return_code, args.junit_files
23+
PLATFORM_TITLES[platform.system()], args.return_code, args.junit_files
2124
)
2225

2326
print(report)

.ci/monolithic-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function at-exit {
3939
shopt -s nullglob
4040

4141
if [[ "$GITHUB_STEP_SUMMARY" != "" ]]; then
42-
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":penguin: Linux x64 Test Results" \
42+
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \
4343
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
4444
fi
4545
}

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function at-exit {
3434
shopt -s nullglob
3535

3636
if [[ "$GITHUB_STEP_SUMMARY" != "" ]]; then
37-
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":window: Windows x64 Test Results" \
37+
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \
3838
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
3939
fi
4040
}

.github/workflows/check-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ permissions:
55

66
on:
77
push:
8+
branches:
9+
- main
810
paths:
911
- '.ci/**'
1012
- '.github/workflows/check-ci.yml'

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ RUN apt-get update && \
5959
sudo \
6060
# These are needed by the premerge pipeline. Pip is used to install
6161
# dependent python packages. File and tzdata are used for tests.
62+
# Having a symlink from python to python3 enables code sharing between
63+
# the Linux and Windows pipelines.
6264
python3-pip \
6365
file \
64-
tzdata && \
66+
tzdata \
67+
python-is-python3 && \
6568
apt-get clean && \
6669
rm -rf /var/lib/apt/lists/*
6770

clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// use it after failing to parse commands from the command line:
1616
//
1717
// RUN: mkdir -p %t.dir/diagnostics/
18-
// RUN: echo '[{"directory": "%/t.dir/diagnostics/","command": "clang++ -fan-option-from-compilation-database -c %/T/diagnostics/input.cpp", "file": "%/T/diagnostics/input.cpp"}]' > %t.dir/diagnostics/compile_commands.json
18+
// RUN: echo '[{"directory": "%/t.dir/diagnostics/","command": "clang++ -fan-option-from-compilation-database -c %/t.dir/diagnostics/input.cpp", "file": "%/t.dir/diagnostics/input.cpp"}]' > %t.dir/diagnostics/compile_commands.json
1919
// RUN: cat %s > %t.dir/diagnostics/input.cpp
2020
// RUN: not clang-tidy -checks='-*,modernize-use-override' %t.dir/diagnostics/nonexistent.cpp -- 2>&1 | FileCheck -check-prefix=CHECK1 -implicit-check-not='{{warning:|error:}}' %s
2121
// RUN: not clang-tidy -checks='-*,clang-diagnostic-*,google-explicit-constructor' %t.dir/diagnostics/input.cpp -- -fan-unknown-option 2>&1 | FileCheck -check-prefix=CHECK2 -implicit-check-not='{{warning:|error:}}' %s

clang-tools-extra/test/clang-tidy/infrastructure/export-relpath.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: rm -rf %t.dir/clang-tidy/export-relpath
33
// RUN: mkdir -p %t.dir/clang-tidy/export-relpath/subdir
44
// RUN: cp %s %t.dir/clang-tidy/export-relpath/subdir/source.cpp
5-
// RUN: echo '[{ "directory": "%/t.dir/clang-tidy/export-relpath/subdir", "command": "clang++ source.cpp", "file": "%/T/clang-tidy/export-relpath/subdir/source.cpp"}]' > %t.dir/clang-tidy/export-relpath/subdir/compile_commands.json
5+
// RUN: echo '[{ "directory": "%/t.dir/clang-tidy/export-relpath/subdir", "command": "clang++ source.cpp", "file": "%/t.dir/clang-tidy/export-relpath/subdir/source.cpp"}]' > %t.dir/clang-tidy/export-relpath/subdir/compile_commands.json
66
//
77
// Check that running clang-tidy in './subdir' and storing results
88
// in './fixes.yaml' works as expected.

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ Bug Fixes to C++ Support
428428
- Fix a crash when deleting a pointer to an incomplete array (#GH150359).
429429
- Fix an assertion failure when expression in assumption attribute
430430
(``[[assume(expr)]]``) creates temporary objects.
431+
- Fix the dynamic_cast to final class optimization to correctly handle
432+
casts that are guaranteed to fail (#GH137518).
431433

432434
Bug Fixes to AST Handling
433435
^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)