Skip to content

Commit fd59a98

Browse files
Merge branch 'llvm:main' into gh-101657
2 parents 5551074 + 34f0611 commit fd59a98

File tree

214 files changed

+14641
-5470
lines changed

Some content is hidden

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

214 files changed

+14641
-5470
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: 5 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.

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,8 @@ AST Matchers
11141114

11151115
- Add ``dependentNameType`` matcher to match a dependent name type.
11161116

1117+
- Add ``dependentTemplateSpecializationType`` matcher to match a dependent template specialization type.
1118+
11171119
clang-format
11181120
------------
11191121

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
@@ -102,6 +102,9 @@ class Context {
102102
/// e.g. "__builtin_abs".
103103
llvm::StringRef getName(unsigned ID) const { return getRecord(ID).Name; }
104104

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

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling",
18901890
" pseudo probes for sample profiling">>;
18911891
def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">,
18921892
Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>,
1893-
HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
1893+
HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var). Deprecated, please use temporal profiling.">;
18941894
def fprofile_list_EQ : Joined<["-"], "fprofile-list=">,
18951895
Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>,
18961896
HelpText<"Filename defining the list of functions/files to instrument. "

0 commit comments

Comments
 (0)