Skip to content

Commit 4f83da2

Browse files
Merge from 'main' to 'sycl-web' (161 commits)
CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChains/Clang.cpp
2 parents b9195b2 + 13dd795 commit 4f83da2

File tree

717 files changed

+64309
-4506
lines changed

Some content is hidden

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

717 files changed

+64309
-4506
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Get LLVM Version
2+
description: >-
3+
Get the LLVM version from the llvm-project source tree. This action assumes
4+
the llvm-project sources have already been checked out into GITHUB_WORKSPACE.
5+
6+
outputs:
7+
major:
8+
description: LLVM major version
9+
value: ${{ steps.version.outputs.major }}
10+
minor:
11+
description: LLVM minor version
12+
value: ${{ steps.version.outputs.minor }}
13+
patch:
14+
description: LLVM patch version
15+
value: ${{ steps.version.outputs.patch }}
16+
17+
runs:
18+
using: "composite"
19+
steps:
20+
- name: Get Version
21+
shell: bash
22+
id: version
23+
run: |
24+
for v in major minor patch; do
25+
echo "$v=`llvm/utils/release/get-llvm-version.sh --$v`" >> $GITHUB_OUTPUT
26+
done

.github/workflows/libclang-abi-tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
3434
ABI_LIBS: ${{ steps.vars.outputs.ABI_LIBS }}
3535
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
36-
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
37-
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
38-
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
36+
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }}
37+
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
38+
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
3939
steps:
4040
- name: Checkout source
4141
uses: actions/checkout@v4
@@ -44,14 +44,14 @@ jobs:
4444

4545
- name: Get LLVM version
4646
id: version
47-
uses: llvm/actions/get-llvm-version@main
47+
uses: ./.github/workflows/get-llvm-version
4848

4949
- name: Setup Variables
5050
id: vars
5151
run: |
5252
remote_repo='https://github.com/llvm/llvm-project'
53-
if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
54-
major_version=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))
53+
if [ ${{ steps.version.outputs.patch }} -eq 0 ]; then
54+
major_version=$(( ${{ steps.version.outputs.major }} - 1))
5555
baseline_ref="llvmorg-$major_version.1.0"
5656
5757
# If there is a minor release, we want to use that as the base line.
@@ -73,8 +73,8 @@ jobs:
7373
} >> "$GITHUB_OUTPUT"
7474
else
7575
{
76-
echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.LLVM_VERSION_MAJOR }}"
77-
echo "BASELINE_REF=llvmorg-${{ steps.version.outputs.LLVM_VERSION_MAJOR }}.1.0"
76+
echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}"
77+
echo "BASELINE_REF=llvmorg-${{ steps.version.outputs.major }}.1.0"
7878
echo "ABI_HEADERS=."
7979
echo "ABI_LIBS=libclang.so libclang-cpp.so"
8080
} >> "$GITHUB_OUTPUT"

.github/workflows/llvm-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
4444
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
4545
BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }}
46-
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
47-
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
48-
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
46+
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }}
47+
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
48+
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
4949
steps:
5050
- name: Checkout source
5151
uses: actions/checkout@v4
@@ -54,7 +54,7 @@ jobs:
5454

5555
- name: Get LLVM version
5656
id: version
57-
uses: llvm/actions/get-llvm-version@main
57+
uses: ./.github/workflows/get-llvm-version
5858

5959
- name: Setup Variables
6060
id: vars
@@ -66,14 +66,14 @@ jobs:
6666
# 18.1.0 We want to check 17.0.x
6767
# 18.1.1 We want to check 18.1.0
6868
echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT"
69-
if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
69+
if [ ${{ steps.version.outputs.patch }} -eq 0 ]; then
7070
{
71-
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))"
71+
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.major }} - 1))"
7272
echo "ABI_HEADERS=llvm-c"
7373
} >> "$GITHUB_OUTPUT"
7474
else
7575
{
76-
echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.LLVM_VERSION_MAJOR }}"
76+
echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}"
7777
echo "ABI_HEADERS=."
7878
} >> "$GITHUB_OUTPUT"
7979
fi

.github/workflows/release-binaries.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
release-binary-filename: ${{ steps.vars.outputs.release-binary-filename }}
5858

5959
steps:
60+
# It's good practice to use setup-python, but this is also required on macos-14
61+
# due to https://github.com/actions/runner-images/issues/10385
62+
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
63+
with:
64+
python-version: '3.12'
65+
6066
- name: Checkout LLVM
6167
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6268

clang-tools-extra/clangd/unittests/HoverTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ class Foo final {})cpp";
13251325
HI.LocalScope = "";
13261326
HI.Kind = index::SymbolKind::TypeAlias;
13271327
HI.Definition = "template <typename T> using AA = A<T>";
1328-
HI.Type = {"A<T>", "type-parameter-0-0"}; // FIXME: should be 'T'
1328+
HI.Type = {"A<T>", "T"};
13291329
HI.TemplateParameters = {
13301330
{{"typename"}, std::string("T"), std::nullopt}};
13311331
}},

clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-local-non-trivial-variable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ T qux(T Generic) {
7676
async::Future<T> TemplateType;
7777
// CHECK-MESSAGES: :[[@LINE-1]]:22: warning: unused local variable 'TemplateType' of type 'async::Future<T>' [bugprone-unused-local-non-trivial-variable]
7878
a::Future<T> AliasTemplateType;
79-
// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: unused local variable 'AliasTemplateType' of type 'a::Future<T>' (aka 'Future<type-parameter-0-0>') [bugprone-unused-local-non-trivial-variable]
79+
// CHECK-MESSAGES: :[[@LINE-1]]:18: warning: unused local variable 'AliasTemplateType' of type 'a::Future<T>' (aka 'Future<T>') [bugprone-unused-local-non-trivial-variable]
8080
[[maybe_unused]] async::Future<Units> MaybeUnused;
8181
return Generic;
8282
}

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi)
328328
# TODO: The preprocessor defines workaround various issues in libc and libc++ integration.
329329
# These should be addressed and removed over time.
330330
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dtimeval=struct timeval{int tv_sec; int tv_usec;}\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1")
331-
if(${target} STREQUAL "armv8m.main-unknown-eabi")
331+
if(${target} STREQUAL "armv8m.main-none-eabi")
332332
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
333333
endif()
334334
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "${RUNTIMES_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ the configuration (without a prefix: ``Auto``).
14841484
* ``OAS_AlignAfterOperator`` (in configuration: ``AlignAfterOperator``)
14851485
Horizontally align operands of binary and ternary expressions.
14861486

1487-
This is similar to ``AO_Align``, except when
1487+
This is similar to ``OAS_Align``, except when
14881488
``BreakBeforeBinaryOperators`` is set, the operator is un-indented so
14891489
that the wrapped operand is aligned with the operand on the first line.
14901490

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,7 @@ Conditional ``explicit`` __cpp_conditional_explicit C+
15031503
``static operator()`` __cpp_static_call_operator C++23 C++03
15041504
Attributes on Lambda-Expressions C++23 C++11
15051505
Attributes on Structured Bindings __cpp_structured_bindings C++26 C++03
1506+
Pack Indexing __cpp_pack_indexing C++26 C++03
15061507
``= delete ("should have a reason");`` __cpp_deleted_function C++26 C++03
15071508
-------------------------------------------- -------------------------------- ------------- -------------
15081509
Designated initializers (N494) C99 C89
@@ -1615,10 +1616,6 @@ The following type trait primitives are supported by Clang. Those traits marked
16151616
* ``__is_nothrow_assignable`` (C++, MSVC 2013)
16161617
* ``__is_nothrow_constructible`` (C++, MSVC 2013)
16171618
* ``__is_nothrow_destructible`` (C++, MSVC 2013)
1618-
* ``__is_nullptr`` (C++, GNU, Microsoft, Embarcadero):
1619-
Returns true for ``std::nullptr_t`` and false for everything else. The
1620-
corresponding standard library feature is ``std::is_null_pointer``, but
1621-
``__is_null_pointer`` is already in use by some implementations.
16221619
* ``__is_object`` (C++, Embarcadero)
16231620
* ``__is_pod`` (C++, GNU, Microsoft, Embarcadero):
16241621
Note, the corresponding standard trait was deprecated in C++20.

clang/docs/OpenMPSupport.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ implementation.
181181
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
182182
| device | user-defined mappers | :good:`done` | D56326,D58638,D58523,D58074,D60972,D59474 |
183183
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
184+
| device | map array-section with implicit mapper | :good:`done` | https://github.com/llvm/llvm-project/pull/101101 |
185+
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
184186
| device | mapping lambda expression | :good:`done` | D51107 |
185187
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
186188
| device | clause: use_device_addr for target data | :good:`done` | |
@@ -312,7 +314,7 @@ implementation.
312314
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
313315
| misc | assumes directives | :part:`worked on` | |
314316
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
315-
| misc | assume directive | :part:`worked on` | |
317+
| misc | assume directive | :good:`done` | |
316318
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
317319
| misc | nothing directive | :good:`done` | D123286 |
318320
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+

clang/docs/ReleaseNotes.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ C/C++ Language Potentially Breaking Changes
4343
C++ Specific Potentially Breaking Changes
4444
-----------------------------------------
4545

46+
- The type trait builtin ``__is_nullptr`` has been removed, since it has very
47+
few users and can be written as ``__is_same(__remove_cv(T), decltype(nullptr))``,
48+
which GCC supports as well.
49+
4650
ABI Changes in This Version
4751
---------------------------
4852

@@ -144,6 +148,9 @@ Improvements to Clang's diagnostics
144148
- Clang now diagnoses undefined behavior in constant expressions more consistently. This includes invalid shifts, and signed overflow in arithmetic.
145149

146150
- -Wdangling-assignment-gsl is enabled by default.
151+
- Clang now does a better job preserving the template arguments as written when specializing concepts.
152+
- Clang now always preserves the template arguments as written used
153+
to specialize template type aliases.
147154

148155
Improvements to Clang's time-trace
149156
----------------------------------
@@ -173,6 +180,12 @@ Bug Fixes to C++ Support
173180
- Clang now correctly parses potentially declarative nested-name-specifiers in pointer-to-member declarators.
174181
- Fix a crash when checking the initialzier of an object that was initialized
175182
with a string literal. (#GH82167)
183+
- Fix a crash when matching template template parameters with templates which have
184+
parameters of different class type. (#GH101394)
185+
- Clang now correctly recognizes the correct context for parameter
186+
substitutions in concepts, so it doesn't incorrectly complain of missing
187+
module imports in those situations. (#GH60336)
188+
- Fix init-capture packs having a size of one before being instantiated. (#GH63677)
176189

177190
Bug Fixes to AST Handling
178191
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -217,6 +230,10 @@ X86 Support
217230
functions defined by the ``*mmintrin.h`` headers. A mapping can be
218231
found in the file ``clang/www/builtins.py``.
219232

233+
- Support ISA of ``AVX10.2``.
234+
* Supported MINMAX intrinsics of ``*_(mask(z)))_minmax(ne)_p[s|d|h|bh]`` and
235+
``*_(mask(z)))_minmax_s[s|d|h]``.
236+
220237
Arm and AArch64 Support
221238
^^^^^^^^^^^^^^^^^^^^^^^
222239

@@ -306,6 +323,11 @@ Python Binding Changes
306323

307324
OpenMP Support
308325
--------------
326+
- Added support for 'omp assume' directive.
327+
328+
Improvements
329+
^^^^^^^^^^^^
330+
- Improve the handling of mapping array-section for struct containing nested structs with user defined mappers
309331

310332
Additional Information
311333
======================

clang/include/clang-c/Index.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,6 +2154,10 @@ enum CXCursorKind {
21542154
*/
21552155
CXCursor_OMPInterchangeDirective = 308,
21562156

2157+
/** OpenMP assume directive.
2158+
*/
2159+
CXCursor_OMPAssumeDirective = 309,
2160+
21572161
/** OpenACC Compute Construct.
21582162
*/
21592163
CXCursor_OpenACCComputeConstruct = 320,

clang/include/clang/AST/ASTConcept.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ class ConstraintSatisfaction : public llvm::FoldingSetNode {
4343
ConstraintSatisfaction() = default;
4444

4545
ConstraintSatisfaction(const NamedDecl *ConstraintOwner,
46-
ArrayRef<TemplateArgument> TemplateArgs) :
47-
ConstraintOwner(ConstraintOwner), TemplateArgs(TemplateArgs.begin(),
48-
TemplateArgs.end()) { }
46+
ArrayRef<TemplateArgument> TemplateArgs)
47+
: ConstraintOwner(ConstraintOwner), TemplateArgs(TemplateArgs) {}
4948

5049
using SubstitutionDiagnostic = std::pair<SourceLocation, StringRef>;
5150
using Detail = llvm::PointerUnion<Expr *, SubstitutionDiagnostic *>;

clang/include/clang/AST/DeclBase.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ class alignas(8) Decl {
673673
/// Whether this declaration comes from explicit global module.
674674
bool isFromExplicitGlobalModule() const;
675675

676+
/// Whether this declaration comes from global module.
677+
bool isFromGlobalModule() const;
678+
676679
/// Whether this declaration comes from a named module.
677680
bool isInNamedModule() const;
678681

0 commit comments

Comments
 (0)