Skip to content

Commit 9e52601

Browse files
SC llvm teammariusz-sikora-at-amd
authored andcommitted
Merged main:3bd71cbec752 into origin/amd-gfx:9fe248e23125
Local branch origin/amd-gfx 9fe248e Fix deprecation warning in AMDGPUConditionalDiscard. NFC. (llvm#1158) Remote branch main 3bd71cb [libc++] Fix ambiguous call in {ranges, std}::find (llvm#122641)
2 parents 9fe248e + 3bd71cb commit 9e52601

File tree

912 files changed

+18709
-18348
lines changed

Some content is hidden

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

912 files changed

+18709
-18348
lines changed

.ci/compute-projects.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ function compute-projects-to-test() {
1818
shift
1919
projects=${@}
2020
for project in ${projects}; do
21-
echo "${project}"
2221
case ${project} in
2322
lld)
24-
for p in bolt cross-project-tests; do
23+
for p in lld bolt cross-project-tests; do
2524
echo $p
2625
done
2726
;;
2827
llvm)
29-
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
28+
for p in llvm bolt clang clang-tools-extra lld lldb mlir polly; do
3029
echo $p
3130
done
3231
# Flang is not stable in Windows CI at the moment
@@ -36,21 +35,30 @@ function compute-projects-to-test() {
3635
;;
3736
clang)
3837
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
39-
for p in clang-tools-extra compiler-rt cross-project-tests; do
38+
for p in clang clang-tools-extra compiler-rt cross-project-tests; do
4039
echo $p
4140
done
4241
;;
4342
clang-tools-extra)
44-
echo libc
43+
for p in clang-tools-extra libc; do
44+
echo $p
45+
done
4546
;;
4647
mlir)
48+
echo mlir
49+
# Flang is not stable in Windows CI at the moment
50+
if [[ $isForWindows == 0 ]]; then
51+
echo flang
52+
fi
53+
;;
54+
flang-rt)
4755
# Flang is not stable in Windows CI at the moment
4856
if [[ $isForWindows == 0 ]]; then
4957
echo flang
5058
fi
5159
;;
5260
*)
53-
# Nothing to do
61+
echo "${project}"
5462
;;
5563
esac
5664
done
@@ -65,6 +73,11 @@ function compute-runtimes-to-test() {
6573
echo $p
6674
done
6775
;;
76+
flang)
77+
for p in flang-rt; do
78+
echo $p
79+
done
80+
;;
6881
*)
6982
# Nothing to do
7083
;;

.ci/generate-buildkite-pipeline-premerge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fi
7373
# needs while letting them run on the infrastructure provided by LLVM.
7474

7575
# Figure out which projects need to be built on each platform
76-
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
76+
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang flang-rt libc libclc lld lldb llvm mlir openmp polly pstl"
7777
modified_projects="$(keep-modified-projects ${all_projects})"
7878

7979
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))

.ci/metrics/metrics.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,24 @@ def github_get_metrics(
168168
created_at = job.created_at
169169
started_at = job.started_at
170170
completed_at = job.completed_at
171-
queue_time = started_at - created_at
172-
run_time = completed_at - started_at
171+
172+
# GitHub API can return results where the started_at is slightly
173+
# later then the created_at (or completed earlier than started).
174+
# This would cause a -23h59mn delta, which will show up as +24h
175+
# queue/run time on grafana.
176+
if started_at < created_at:
177+
logging.info(
178+
"Workflow {} started before being created.".format(task.id)
179+
)
180+
queue_time = datetime.timedelta(seconds=0)
181+
else:
182+
queue_time = started_at - created_at
183+
if completed_at < started_at:
184+
logging.info("Workflow {} finished before starting.".format(task.id))
185+
run_time = datetime.timedelta(seconds=0)
186+
else:
187+
run_time = completed_at - started_at
188+
173189
if run_time.seconds == 0:
174190
continue
175191

.ci/monolithic-linux.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
6565
-D CMAKE_CXX_FLAGS=-gmlt \
6666
-D LLVM_CCACHE_BUILD=ON \
6767
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
68+
-D FLANG_ENABLE_FLANG_RT=OFF \
6869
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
6970

7071
echo "--- ninja"
@@ -95,6 +96,9 @@ if [[ "${runtimes}" != "" ]]; then
9596
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
9697
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
9798
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
99+
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
100+
-D CMAKE_Fortran_COMPILER_WORKS=ON \
101+
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
98102
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
99103
-D LIBCXX_CXX_ABI=libcxxabi \
100104
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -113,6 +117,9 @@ if [[ "${runtimes}" != "" ]]; then
113117
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
114118
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
115119
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
120+
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
121+
-D CMAKE_Fortran_COMPILER_WORKS=ON \
122+
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
116123
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
117124
-D LIBCXX_CXX_ABI=libcxxabi \
118125
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -131,6 +138,9 @@ if [[ "${runtimes}" != "" ]]; then
131138
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
132139
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
133140
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
141+
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
142+
-D CMAKE_Fortran_COMPILER_WORKS=ON \
143+
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
134144
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
135145
-D LIBCXX_CXX_ABI=libcxxabi \
136146
-D CMAKE_BUILD_TYPE=RelWithDebInfo \

clang/docs/ReleaseNotes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ Bug Fixes to Attribute Support
292292
Bug Fixes to C++ Support
293293
^^^^^^^^^^^^^^^^^^^^^^^^
294294

295+
- Clang now diagnoses copy constructors taking the class by value in template instantiations. (#GH130866)
295296
- Clang is now better at keeping track of friend function template instance contexts. (#GH55509)
296297
- Clang now prints the correct instantiation context for diagnostics suppressed
297298
by template argument deduction.
@@ -308,6 +309,7 @@ Bug Fixes to C++ Support
308309
not in the last position.
309310
- Clang now correctly parses ``if constexpr`` expressions in immediate function context. (#GH123524)
310311
- Fixed an assertion failure affecting code that uses C++23 "deducing this". (#GH130272)
312+
- Clang now properly instantiates destructors for initialized members within non-delegating constructors. (#GH93251)
311313

312314
Bug Fixes to AST Handling
313315
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -357,6 +359,10 @@ Android Support
357359
Windows Support
358360
^^^^^^^^^^^^^^^
359361

362+
- Clang now defines ``_CRT_USE_BUILTIN_OFFSETOF`` macro in MSVC-compatible mode,
363+
which makes ``offsetof`` provided by Microsoft's ``<stddef.h>`` to be defined
364+
correctly. (#GH59689)
365+
360366
LoongArch Support
361367
^^^^^^^^^^^^^^^^^
362368

clang/docs/UsersManual.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,6 @@ be collected.
31953195
the profile file to ``Name``.
31963196
* ``void __llvm_profile_reset_counters(void)``: resets all counters to zero.
31973197
* ``int __llvm_profile_dump(void)``: write the profile data to disk.
3198-
* ``int __llvm_orderfile_dump(void)``: write the order file to disk.
31993198

32003199
For example, the following pattern can be used to skip profiling program
32013200
initialization, profile two specific hot regions, and skip profiling program

clang/docs/analyzer/checkers.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3476,6 +3476,24 @@ Limitations:
34763476
alpha.WebKit
34773477
^^^^^^^^^^^^
34783478
3479+
alpha.webkit.ForwardDeclChecker
3480+
"""""""""""""""""""""""""""""""
3481+
Check for local variables, member variables, and function arguments that are forward declared.
3482+
3483+
.. code-block:: cpp
3484+
3485+
struct Obj;
3486+
Obj* provide();
3487+
3488+
struct Foo {
3489+
Obj* ptr; // warn
3490+
};
3491+
3492+
void foo() {
3493+
Obj* obj = provide(); // warn
3494+
consume(obj); // warn
3495+
}
3496+
34793497
.. _alpha-webkit-NoUncheckedPtrMemberChecker:
34803498
34813499
alpha.webkit.MemoryUnsafeCastChecker
@@ -3779,6 +3797,26 @@ Here are some examples of situations that we warn about as they *might* be poten
37793797
NSObject* unretained = retained.get(); // warn
37803798
}
37813799
3800+
webkit.RetainPtrCtorAdoptChecker
3801+
""""""""""""""""""""""""""""""""
3802+
The goal of this rule is to make sure the constructor of RetainPtr as well as adoptNS and adoptCF are used correctly.
3803+
When creating a RetainPtr with +1 semantics, adoptNS or adoptCF should be used, and in +0 semantics, RetainPtr constructor should be used.
3804+
Warn otherwise.
3805+
3806+
These are examples of cases that we consider correct:
3807+
3808+
.. code-block:: cpp
3809+
3810+
RetainPtr ptr = adoptNS([[NSObject alloc] init]); // ok
3811+
RetainPtr ptr = CGImageGetColorSpace(image); // ok
3812+
3813+
Here are some examples of cases that we consider incorrect use of RetainPtr constructor and adoptCF
3814+
3815+
.. code-block:: cpp
3816+
3817+
RetainPtr ptr = [[NSObject alloc] init]; // warn
3818+
auto ptr = adoptCF(CGImageGetColorSpace(image)); // warn
3819+
37823820
Debug Checkers
37833821
---------------
37843822

clang/include/clang/AST/DeclTemplate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3392,7 +3392,7 @@ inline std::optional<unsigned> getExpandedPackSize(const NamedDecl *Param) {
33923392

33933393
/// Internal helper used by Subst* nodes to retrieve the parameter list
33943394
/// for their AssociatedDecl.
3395-
TemplateParameterList *getReplacedTemplateParameterList(Decl *D);
3395+
TemplateParameterList *getReplacedTemplateParameterList(const Decl *D);
33963396

33973397
} // namespace clang
33983398

clang/include/clang/Basic/TargetInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ class TargetInfo : public TransferrableTargetInfo,
16751675
// access target-specific GPU grid values that must be consistent between
16761676
// host RTL (plugin), deviceRTL and clang.
16771677
virtual const llvm::omp::GV &getGridValue() const {
1678-
return llvm::omp::SPIRVGridValues;
1678+
llvm_unreachable("getGridValue not implemented on this target");
16791679
}
16801680

16811681
/// Retrieve the name of the platform as it is used in the

clang/include/clang/CIR/Dialect/IR/CIRAttrs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class VarDecl;
3030
class RecordDecl;
3131
} // namespace clang
3232

33+
namespace cir {
34+
class ArrayType;
35+
} // namespace cir
36+
3337
#define GET_ATTRDEF_CLASSES
3438
#include "clang/CIR/Dialect/IR/CIROpsAttributes.h.inc"
3539

0 commit comments

Comments
 (0)