Skip to content

Commit ec10bb5

Browse files
authored
Merge branch 'llvm:main' into dfsan_Endian
2 parents 552bdae + b92483c commit ec10bb5

File tree

220 files changed

+6754
-3793
lines changed

Some content is hidden

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

220 files changed

+6754
-3793
lines changed

.github/new-prs-labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,8 @@ clang:openmp:
10961096
- llvm/test/Transforms/OpenMP/**
10971097

10981098
clang:temporal-safety:
1099-
- clang/include/clang/Analysis/Analyses/LifetimeSafety/**
1100-
- clang/lib/Analysis/LifetimeSafety/**
1099+
- clang/include/clang/Analysis/Analyses/LifetimeSafety*
1100+
- clang/lib/Analysis/LifetimeSafety*
11011101
- clang/unittests/Analysis/LifetimeSafety*
11021102
- clang/test/Sema/*lifetime-safety*
11031103
- clang/test/Sema/*lifetime-analysis*

.github/workflows/release-binaries-save-stage/action.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/release-binaries-setup-stage/action.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/release-binaries.yml

Lines changed: 21 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -194,40 +194,30 @@ jobs:
194194
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
195195
steps:
196196

197-
- name: Checkout Actions
198-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
199-
with:
200-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
201-
sparse-checkout: |
202-
.github/workflows/
203-
sparse-checkout-cone-mode: false
204-
# Check out outside of working directory so the source checkout doesn't
205-
# remove it.
206-
path: workflows
207-
208-
# actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
209-
# Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
210-
# by future actions/checkout steps. Therefore, in order to checkout the
211-
# latest actions from main, we need to first checkout out the actions inside of
212-
# GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
213-
# the code being built and the move the actions from main back into GITHUB_WORKSPACE,
214-
# becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
215-
- shell: bash
216-
run: mv workflows ../workflows-main
217-
218197
- name: Checkout LLVM
219198
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
220199
with:
221200
ref: ${{ needs.prepare.outputs.ref }}
222201

223-
- name: Copy main workflows
224-
shell: bash
225-
run: |
226-
mv ../workflows-main .
202+
- name: Install Ninja
203+
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main
204+
205+
- name: Setup Windows
206+
if: startsWith(runner.os, 'Windows')
207+
uses: llvm/actions/setup-windows@main
208+
with:
209+
arch: amd64
227210

228-
- name: Setup Stage
211+
- name: Set Build Prefix
229212
id: setup-stage
230-
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
213+
shell: bash
214+
run: |
215+
build_prefix=`pwd`
216+
if [ "${{ runner.os }}" = "Linux" ]; then
217+
sudo chown $USER:$USER /mnt/
218+
build_prefix=/mnt/
219+
fi
220+
echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT
231221
232222
- name: Configure
233223
id: build
@@ -258,17 +248,11 @@ jobs:
258248
path: |
259249
${{ needs.prepare.outputs.release-binary-filename }}
260250
261-
# Clean up some build files to reduce size of artifact.
262-
- name: Clean Up Build Directory
263-
shell: bash
251+
- name: Run Tests
252+
# These almost always fail so don't let them fail the build and prevent the uploads.
253+
continue-on-error: true
264254
run: |
265-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete
266-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} +
267-
268-
- name: Save Stage
269-
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
270-
with:
271-
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
255+
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all
272256
273257
upload-release-binaries:
274258
name: "Upload Release Binaries"
@@ -327,31 +311,3 @@ jobs:
327311
--release ${{ needs.prepare.outputs.release-version }} \
328312
upload \
329313
--files ${{ needs.prepare.outputs.release-binary-filename }}*
330-
331-
test-release:
332-
name: "Test Release"
333-
needs:
334-
- prepare
335-
- build-release-package
336-
if: >-
337-
github.repository_owner == 'llvm'
338-
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
339-
steps:
340-
- name: Checkout Actions
341-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
342-
with:
343-
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
344-
sparse-checkout: |
345-
.github/workflows/
346-
sparse-checkout-cone-mode: false
347-
path: workflows
348-
- name: Setup Stage
349-
id: setup-stage
350-
uses: ./workflows/.github/workflows/release-binaries-setup-stage
351-
with:
352-
previous-artifact: build-release-package
353-
354-
- name: Run Tests
355-
shell: bash
356-
run: |
357-
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all

clang-tools-extra/clang-doc/JSONGenerator.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,11 +582,10 @@ static SmallString<16> determineFileName(Info *I, SmallString<128> &Path) {
582582
if (I->IT == InfoType::IT_record) {
583583
auto *RecordSymbolInfo = static_cast<SymbolInfo *>(I);
584584
FileName = RecordSymbolInfo->MangledName;
585-
} else if (I->IT == InfoType::IT_namespace && I->Name != "")
586-
// Serialize the global namespace as index.json
587-
FileName = I->Name;
585+
} else if (I->USR == GlobalNamespaceID)
586+
FileName = "index";
588587
else
589-
FileName = I->getFileBaseName();
588+
FileName = I->Name;
590589
sys::path::append(Path, FileName + ".json");
591590
return FileName;
592591
}

clang-tools-extra/clang-doc/Representation.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ namespace doc {
3030
// SHA1'd hash of a USR.
3131
using SymbolID = std::array<uint8_t, 20>;
3232

33+
constexpr SymbolID GlobalNamespaceID = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
34+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
35+
3336
struct BaseRecordInfo;
3437
struct EnumInfo;
3538
struct FunctionInfo;

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-bounds-constant-array-index-c++03.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %check_clang_tidy -std=c++98-or-later %s cppcoreguidelines-pro-bounds-constant-array-index %t
22

3-
// Note: this test expects no diagnostics, but FileCheck cannot handle that,
4-
// hence the use of | count 0.
53
template <int index> struct B {
64
int get() {
75
// The next line used to crash the check (in C++03 mode only).

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ C Language Changes
180180

181181
C2y Feature Support
182182
^^^^^^^^^^^^^^^^^^^
183+
- No longer triggering ``-Wstatic-in-inline`` in C2y mode; use of a static
184+
function or variable within an extern inline function is no longer a
185+
constraint per `WG14 N3622 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3622.txt>`_.
183186
- Clang now supports `N3355 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm>`_ Named Loops.
184187

185188
C23 Feature Support

clang/include/clang/AST/Expr.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7160,6 +7160,18 @@ class ArraySectionExpr : public Expr {
71607160
/// Return original type of the base expression for array section.
71617161
static QualType getBaseOriginalType(const Expr *Base);
71627162

7163+
/// Return the effective 'element' type of this array section. As the array
7164+
/// section itself returns a collection of elements (closer to its `getBase`
7165+
/// type), this is only useful for figuring out the effective type of this if
7166+
/// it were a normal Array subscript expr.
7167+
QualType getElementType() const;
7168+
7169+
/// Returns the effective 'type' of the base of this array section. This
7170+
/// should be the array/pointer type that this operates on. Just
7171+
/// getBase->getType isn't sufficient, since it doesn't look through existing
7172+
/// Array sections to figure out the actual 'base' of this.
7173+
QualType getBaseType() const;
7174+
71637175
static bool classof(const Stmt *T) {
71647176
return T->getStmtClass() == ArraySectionExprClass;
71657177
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
#include "clang/AST/DeclCXX.h"
1414

15-
namespace clang ::lifetimes {
15+
namespace clang {
16+
namespace lifetimes {
1617

1718
/// Returns the most recent declaration of the method to ensure all
1819
/// lifetime-bound attributes from redeclarations are considered.
@@ -37,7 +38,7 @@ bool isAssignmentOperatorLifetimeBound(const CXXMethodDecl *CMD);
3738
/// lifetimebound, either due to an explicit lifetimebound attribute on the
3839
/// method or because it's a normal assignment operator.
3940
bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD);
40-
41-
} // namespace clang::lifetimes
41+
} // namespace lifetimes
42+
} // namespace clang
4243

4344
#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMEANNOTATIONS_H

0 commit comments

Comments
 (0)