Skip to content

Commit 383926f

Browse files
committed
Merge commit 'c1ea05eaf0fbe4b539952689dbf9f0df716c72e7' into llvmspirv_pulldown
2 parents 9fce48b + c1ea05e commit 383926f

File tree

441 files changed

+27801
-10395
lines changed

Some content is hidden

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

441 files changed

+27801
-10395
lines changed

.github/workflows/build-ci-container.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ jobs:
5959

6060
- name: Test Container
6161
run: |
62-
for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do
63-
podman run --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
62+
for image in ${{ steps.vars.outputs.container-name-tag }}; do
63+
# Use --pull=never to ensure we are testing the just built image.
64+
podman run --pull=never --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
6465
done
6566
6667
push-ci-container:

.github/workflows/new-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: llvm/actions/issue-labeler@main
1717
with:
18-
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
repo-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}
1919
configuration-path: .github/new-issues-labeler.yml
2020
include-title: 1
2121
include-body: 0

.github/workflows/release-binaries.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
8484
shell: bash
8585
run: |
86-
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
86+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions
8787
8888
- name: Collect Variables
8989
id: vars
@@ -102,8 +102,8 @@ jobs:
102102
release_version="$trimmed"
103103
ref="llvmorg-$release_version"
104104
else
105-
release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-${{ github.sha }}"
106-
ref=${{ github.sha }}
105+
release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA"
106+
ref="$GITHUB_SHA"
107107
fi
108108
if [ -n "${{ inputs.upload }}" ]; then
109109
upload="${{ inputs.upload }}"
@@ -114,20 +114,20 @@ jobs:
114114
echo "ref=$ref" >> $GITHUB_OUTPUT
115115
echo "upload=$upload" >> $GITHUB_OUTPUT
116116
117-
release_binary_basename="LLVM-$release_version-${{ runner.os }}-${{ runner.arch }}"
117+
release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH"
118118
echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
119119
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
120120
121121
# Detect necessary CMake flags
122-
target="${{ runner.os }}-${{ runner.arch }}"
122+
target="$RUNNER_OS-$RUNNER_ARCH"
123123
echo "enable-pgo=false" >> $GITHUB_OUTPUT
124124
target_cmake_flags="-DLLVM_RELEASE_ENABLE_PGO=OFF"
125125
# The macOS builds try to cross compile some libraries so we need to
126126
# add extra CMake args to disable them.
127127
# See https://github.com/llvm/llvm-project/issues/99767
128-
if [ "${{ runner.os }}" = "macOS" ]; then
128+
if [ "$RUNNER_OS" = "macOS" ]; then
129129
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
130-
if [ "${{ runner.arch }}" = "ARM64" ]; then
130+
if [ "$RUNNER_ARCH" = "ARM64" ]; then
131131
arches=arm64
132132
else
133133
arches=x86_64
@@ -137,7 +137,7 @@ jobs:
137137
138138
build_flang="true"
139139
140-
if [ "${{ runner.os }}" = "Windows" ]; then
140+
if [ "$RUNNER_OS" = "Windows" ]; then
141141
# The build times out on Windows, so we need to disable LTO.
142142
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
143143
fi

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4661,12 +4661,13 @@ the configuration (without a prefix: ``Auto``).
46614661
.. _KeepEmptyLinesAtEOF:
46624662

46634663
**KeepEmptyLinesAtEOF** (``Boolean``) :versionbadge:`clang-format 17` :ref:`<KeepEmptyLinesAtEOF>`
4664-
This option is deprecated. See ``AtEndOfFile`` of ``KeepEmptyLines``.
4664+
This option is **deprecated**. See ``AtEndOfFile`` of ``KeepEmptyLines``.
46654665

46664666
.. _KeepEmptyLinesAtTheStartOfBlocks:
46674667

46684668
**KeepEmptyLinesAtTheStartOfBlocks** (``Boolean``) :versionbadge:`clang-format 3.7` :ref:`<KeepEmptyLinesAtTheStartOfBlocks>`
4669-
This option is deprecated. See ``AtStartOfBlock`` of ``KeepEmptyLines``.
4669+
This option is **deprecated**. See ``AtStartOfBlock`` of
4670+
``KeepEmptyLines``.
46704671

46714672
.. _KeepFormFeed:
46724673

@@ -6730,8 +6731,8 @@ the configuration (without a prefix: ``Auto``).
67306731
.. _TemplateNames:
67316732

67326733
**TemplateNames** (``List of Strings``) :versionbadge:`clang-format 20` :ref:`<TemplateNames>`
6733-
A vector of non-keyword identifiers that should be interpreted as
6734-
template names.
6734+
A vector of non-keyword identifiers that should be interpreted as template
6735+
names.
67356736

67366737
A ``<`` after a template name is annotated as a template opener instead of
67376738
a binary operator.
@@ -6843,6 +6844,45 @@ the configuration (without a prefix: ``Auto``).
68436844
68446845
For example: BOOST_PP_STRINGIZE
68456846

6847+
.. _WrapNamespaceBodyWithEmptyLines:
6848+
6849+
**WrapNamespaceBodyWithEmptyLines** (``WrapNamespaceBodyWithEmptyLinesStyle``) :versionbadge:`clang-format 20` :ref:`<WrapNamespaceBodyWithEmptyLines>`
6850+
Wrap namespace body with empty lines.
6851+
6852+
Possible values:
6853+
6854+
* ``WNBWELS_Never`` (in configuration: ``Never``)
6855+
Remove all empty lines at the beginning and the end of namespace body.
6856+
6857+
.. code-block:: c++
6858+
6859+
namespace N1 {
6860+
namespace N2
6861+
function();
6862+
}
6863+
}
6864+
6865+
* ``WNBWELS_Always`` (in configuration: ``Always``)
6866+
Always have at least one empty line at the beginning and the end of
6867+
namespace body except that the number of empty lines between consecutive
6868+
nested namespace definitions is not increased.
6869+
6870+
.. code-block:: c++
6871+
6872+
namespace N1 {
6873+
namespace N2 {
6874+
6875+
function();
6876+
6877+
}
6878+
}
6879+
6880+
* ``WNBWELS_Leave`` (in configuration: ``Leave``)
6881+
Keep existing newlines at the beginning and the end of namespace body.
6882+
``MaxEmptyLinesToKeep`` still applies.
6883+
6884+
6885+
68466886
.. END_FORMAT_STYLE_OPTIONS
68476887
68486888
Adding additional style options

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3641,7 +3641,7 @@ program location should be executed. It is expected to be used to implement
36413641
<https://llvm.org/docs/LangRef.html#llvm-allow-runtime-check-intrinsic>`_
36423642
intrinsic.
36433643
3644-
The ``__builtin_allow_runtime_check()`` can be used within constrol structures
3644+
The ``__builtin_allow_runtime_check()`` can be used within control structures
36453645
like ``if`` to guard expensive runtime checks. The return value is determined
36463646
by the following compiler options and may differ per call site:
36473647

clang/docs/LibASTMatchersReference.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,6 +2546,17 @@ <h2 id="decl-matchers">Node Matchers</h2>
25462546
};
25472547
</pre></td></tr>
25482548

2549+
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>&gt;</td><td class="name" onclick="toggle('dependentTemplateSpecializationType0')"><a name="dependentTemplateSpecializationType0Anchor">dependentTemplateSpecializationType</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DependentTemplateSpecializationType.html">DependentTemplateSpecializationType</a>&gt;...</td></tr>
2550+
<tr><td colspan="4" class="doc" id="dependentTemplateSpecializationType0"><pre>Matches a dependent template specialization type.
2551+
2552+
Example matches A<T>::template B<T>
2553+
2554+
template<typename T> struct A;
2555+
template<typename T> struct declToImport {
2556+
typename A<T>::template B<T> a;
2557+
};
2558+
</pre></td></tr>
2559+
25492560
<tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>&gt;</td><td class="name" onclick="toggle('deducedTemplateSpecializationType0')"><a name="deducedTemplateSpecializationType0Anchor">deducedTemplateSpecializationType</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DeducedTemplateSpecializationType.html">DeducedTemplateSpecializationType</a>&gt;...</td></tr>
25502561
<tr><td colspan="4" class="doc" id="deducedTemplateSpecializationType0"><pre>Matches C++17 deduced template specialization types, e.g. deduced class
25512562
template types.

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@ Bug Fixes to C++ Support
886886
out of a module (which is the case e.g. in MSVC's implementation of ``std`` module). (#GH118218)
887887
- Fixed a pack expansion issue in checking unexpanded parameter sizes. (#GH17042)
888888
- Fixed a bug where captured structured bindings were modifiable inside non-mutable lambda (#GH95081)
889+
- Clang now identifies unexpanded parameter packs within the type constraint on a non-type template parameter. (#GH88866)
889890
- Fixed an issue while resolving type of expression indexing into a pack of values of non-dependent type (#GH121242)
890891

891892
Bug Fixes to AST Handling
@@ -1113,6 +1114,8 @@ AST Matchers
11131114

11141115
- Add ``dependentNameType`` matcher to match a dependent name type.
11151116

1117+
- Add ``dependentTemplateSpecializationType`` matcher to match a dependent template specialization type.
1118+
11161119
clang-format
11171120
------------
11181121

@@ -1127,6 +1130,7 @@ clang-format
11271130
- Adds ``AllowShortNamespacesOnASingleLine`` option.
11281131
- Adds ``VariableTemplates`` option.
11291132
- Adds support for bash globstar in ``.clang-format-ignore``.
1133+
- Adds ``WrapNamespaceBodyWithEmptyLines`` option.
11301134

11311135
libclang
11321136
--------

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7721,6 +7721,18 @@ AST_MATCHER_P(DecayedType, hasDecayedType, internal::Matcher<QualType>,
77217721
/// \endcode
77227722
extern const AstTypeMatcher<DependentNameType> dependentNameType;
77237723

7724+
/// Matches a dependent template specialization type
7725+
///
7726+
/// Example matches A<T>::template B<T>
7727+
/// \code
7728+
/// template<typename T> struct A;
7729+
/// template<typename T> struct declToImport {
7730+
/// typename A<T>::template B<T> a;
7731+
/// };
7732+
/// \endcode
7733+
extern const AstTypeMatcher<DependentTemplateSpecializationType>
7734+
dependentTemplateSpecializationType;
7735+
77247736
/// Matches declarations whose declaration context, interpreted as a
77257737
/// Decl, matches \c InnerMatcher.
77267738
///

clang/include/clang/Basic/Builtins.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class Context {
103103
/// e.g. "__builtin_abs".
104104
llvm::StringRef getName(unsigned ID) const { return getRecord(ID).Name; }
105105

106+
/// Return a quoted name for the specified builtin for use in diagnostics.
107+
std::string getQuotedName(unsigned ID) const;
108+
106109
/// Get the type descriptor string for the specified builtin.
107110
const char *getTypeString(unsigned ID) const { return getRecord(ID).Type; }
108111

clang/include/clang/Basic/BuiltinsBase.td

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,15 @@ class Builtin {
8888
// On some platforms, some functions are actually macros. In that case we need
8989
// to #undef them.
9090
bit RequiresUndef = 0;
91+
// Enables builtins to generate `long long` outside of OpenCL and `long` inside.
92+
bit EnableOpenCLLong = 0;
9193
}
9294

9395
class CustomEntry {
9496
string Entry;
9597
}
9698

9799
class AtomicBuiltin : Builtin;
98-
class TargetBuiltin : Builtin {
99-
string Features = "";
100-
}
101100

102101
class LibBuiltin<string header, string languages = "ALL_LANGUAGES"> : Builtin {
103102
string Header = header;
@@ -122,6 +121,14 @@ class OCL_DSELangBuiltin : LangBuiltin<"OCL_DSE">;
122121
class OCL_GASLangBuiltin : LangBuiltin<"OCL_GAS">;
123122
class OCLLangBuiltin : LangBuiltin<"ALL_OCL_LANGUAGES">;
124123

124+
class TargetBuiltin : Builtin {
125+
string Features = "";
126+
}
127+
class TargetLibBuiltin : TargetBuiltin {
128+
string Header;
129+
string Languages = "ALL_LANGUAGES";
130+
}
131+
125132
class Template<list<string> substitutions,
126133
list<string> affixes,
127134
bit as_prefix = 0> {

0 commit comments

Comments
 (0)