Skip to content

Commit 234a85b

Browse files
committed
Merge branch 'upstream' into x86-shuffle-extend512
2 parents ad480c2 + b9a1e58 commit 234a85b

File tree

321 files changed

+8566
-2326
lines changed

Some content is hidden

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

321 files changed

+8566
-2326
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
stage1:
3838
if: github.repository_owner == 'llvm'
3939
runs-on: libcxx-self-hosted-linux
40-
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
40+
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
4141
continue-on-error: false
4242
strategy:
4343
fail-fast: false
@@ -48,8 +48,8 @@ jobs:
4848
'generic-cxx26',
4949
'generic-modules'
5050
]
51-
cc: [ 'clang-20' ]
52-
cxx: [ 'clang++-20' ]
51+
cc: [ 'clang-21' ]
52+
cxx: [ 'clang++-21' ]
5353
include:
5454
- config: 'generic-gcc'
5555
cc: 'gcc-14'
@@ -75,7 +75,7 @@ jobs:
7575
stage2:
7676
if: github.repository_owner == 'llvm'
7777
runs-on: libcxx-self-hosted-linux
78-
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
78+
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
7979
needs: [ stage1 ]
8080
continue-on-error: false
8181
strategy:
@@ -88,18 +88,22 @@ jobs:
8888
'generic-cxx20',
8989
'generic-cxx23'
9090
]
91-
cc: [ 'clang-20' ]
92-
cxx: [ 'clang++-20' ]
91+
cc: [ 'clang-21' ]
92+
cxx: [ 'clang++-21' ]
9393
include:
9494
- config: 'generic-gcc-cxx11'
9595
cc: 'gcc-14'
9696
cxx: 'g++-14'
97-
- config: 'generic-cxx23'
98-
cc: 'clang-18'
99-
cxx: 'clang++-18'
97+
- config: 'generic-cxx26'
98+
cc: 'clang-20'
99+
cxx: 'clang++-20'
100100
- config: 'generic-cxx26'
101101
cc: 'clang-19'
102102
cxx: 'clang++-19'
103+
# Release transition
104+
- config: 'generic-cxx23'
105+
cc: 'clang-18'
106+
cxx: 'clang++-18'
103107
steps:
104108
- uses: actions/checkout@v4
105109
- name: ${{ matrix.config }}
@@ -163,14 +167,14 @@ jobs:
163167
- config: 'generic-msan'
164168
machine: libcxx-self-hosted-linux
165169
runs-on: ${{ matrix.machine }}
166-
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
170+
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
167171
steps:
168172
- uses: actions/checkout@v4
169173
- name: ${{ matrix.config }}
170174
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
171175
env:
172-
CC: clang-20
173-
CXX: clang++-20
176+
CC: clang-21
177+
CXX: clang++-21
174178
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
175179
if: always()
176180
with:

clang/docs/LanguageExtensions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ with the current table size.
26292629
.. code-block:: c++
26302630
26312631
typedef void (*__funcref funcref_t)();
2632-
static __funcref table[0];
2632+
static funcref_t table[0];
26332633
26342634
size_t getSize() {
26352635
return __builtin_wasm_table_size(table);
@@ -2651,10 +2651,10 @@ or -1. It will return -1 if not enough space could be allocated.
26512651
.. code-block:: c++
26522652
26532653
typedef void (*__funcref funcref_t)();
2654-
static __funcref table[0];
2654+
static funcref_t table[0];
26552655
26562656
// grow returns the new table size or -1 on error.
2657-
int grow(__funcref fn, int delta) {
2657+
int grow(funcref_t fn, int delta) {
26582658
int prevSize = __builtin_wasm_table_grow(table, fn, delta);
26592659
if (prevSize == -1)
26602660
return -1;

clang/include/clang/AST/DeclBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ class alignas(8) Decl {
492492
/// perform non-Decl specific checks based on the object's type and strict
493493
/// flex array level.
494494
static bool isFlexibleArrayMemberLike(
495-
ASTContext &Context, const Decl *D, QualType Ty,
495+
const ASTContext &Context, const Decl *D, QualType Ty,
496496
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
497497
bool IgnoreTemplateOrMacroSubstitution);
498498

clang/include/clang/AST/Expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class Expr : public ValueStmt {
542542
/// When IgnoreTemplateOrMacroSubstitution is set, it doesn't consider sizes
543543
/// resulting from the substitution of a macro or a template as special sizes.
544544
bool isFlexibleArrayMemberLike(
545-
ASTContext &Context,
545+
const ASTContext &Context,
546546
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
547547
bool IgnoreTemplateOrMacroSubstitution = false) const;
548548

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10606,6 +10606,9 @@ def warn_noreturn_function_has_return_expr : Warning<
1060610606
def warn_falloff_noreturn_function : Warning<
1060710607
"function declared 'noreturn' should not return">,
1060810608
InGroup<InvalidNoreturn>;
10609+
def warn_noreturn_coroutine : Warning<
10610+
"coroutine %0 cannot be declared 'noreturn' as it always returns a coroutine handle">,
10611+
InGroup<InvalidNoreturn>;
1060910612
def err_noreturn_block_has_return_expr : Error<
1061010613
"block declared 'noreturn' should not return">;
1061110614
def err_carries_dependency_missing_on_first_decl : Error<

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3898,7 +3898,8 @@ QualType ASTContext::getArrayParameterType(QualType Ty) const {
38983898
if (Ty->isArrayParameterType())
38993899
return Ty;
39003900
assert(Ty->isConstantArrayType() && "Ty must be an array type.");
3901-
const auto *ATy = cast<ConstantArrayType>(Ty.getDesugaredType(*this));
3901+
QualType DTy = Ty.getDesugaredType(*this);
3902+
const auto *ATy = cast<ConstantArrayType>(DTy);
39023903
llvm::FoldingSetNodeID ID;
39033904
ATy->Profile(ID, *this, ATy->getElementType(), ATy->getZExtSize(),
39043905
ATy->getSizeExpr(), ATy->getSizeModifier(),
@@ -3910,7 +3911,7 @@ QualType ASTContext::getArrayParameterType(QualType Ty) const {
39103911
return QualType(AT, 0);
39113912

39123913
QualType Canonical;
3913-
if (!Ty.isCanonical()) {
3914+
if (!DTy.isCanonical()) {
39143915
Canonical = getArrayParameterType(getCanonicalType(Ty));
39153916

39163917
// Get the new insert position for the node we care about.

clang/lib/AST/ByteCode/Descriptor.cpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ static void moveRecord(Block *B, std::byte *Src, std::byte *Dst,
237237
assert(D);
238238
assert(D->ElemRecord);
239239

240-
// FIXME: There might be cases where we need to move over the (v)bases as
241-
// well.
240+
// FIXME: Code duplication.
242241
for (const auto &F : D->ElemRecord->fields()) {
243242
auto FieldOffset = F.Offset;
244243
const auto *SrcDesc =
@@ -250,6 +249,26 @@ static void moveRecord(Block *B, std::byte *Src, std::byte *Dst,
250249
if (auto Fn = F.Desc->MoveFn)
251250
Fn(B, Src + FieldOffset, Dst + FieldOffset, F.Desc);
252251
}
252+
253+
for (const auto &Base : D->ElemRecord->bases()) {
254+
auto BaseOffset = Base.Offset;
255+
const auto *SrcDesc =
256+
reinterpret_cast<const InlineDescriptor *>(Src + BaseOffset) - 1;
257+
auto *DestDesc = reinterpret_cast<InlineDescriptor *>(Dst + BaseOffset) - 1;
258+
std::memcpy(DestDesc, SrcDesc, sizeof(InlineDescriptor));
259+
260+
if (auto Fn = Base.Desc->MoveFn)
261+
Fn(B, Src + BaseOffset, Dst + BaseOffset, Base.Desc);
262+
}
263+
264+
for (const auto &VBase : D->ElemRecord->virtual_bases()) {
265+
auto VBaseOffset = VBase.Offset;
266+
const auto *SrcDesc =
267+
reinterpret_cast<const InlineDescriptor *>(Src + VBaseOffset) - 1;
268+
auto *DestDesc =
269+
reinterpret_cast<InlineDescriptor *>(Dst + VBaseOffset) - 1;
270+
std::memcpy(DestDesc, SrcDesc, sizeof(InlineDescriptor));
271+
}
253272
}
254273

255274
static BlockCtorFn getCtorPrim(PrimType Type) {

clang/lib/AST/DeclBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ bool Decl::isFileContextDecl() const {
438438
}
439439

440440
bool Decl::isFlexibleArrayMemberLike(
441-
ASTContext &Ctx, const Decl *D, QualType Ty,
441+
const ASTContext &Ctx, const Decl *D, QualType Ty,
442442
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
443443
bool IgnoreTemplateOrMacroSubstitution) {
444444
// For compatibility with existing code, we treat arrays of length 0 or

clang/lib/AST/Expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ bool Expr::isKnownToHaveBooleanValue(bool Semantic) const {
203203
}
204204

205205
bool Expr::isFlexibleArrayMemberLike(
206-
ASTContext &Ctx,
206+
const ASTContext &Ctx,
207207
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel,
208208
bool IgnoreTemplateOrMacroSubstitution) const {
209209
const Expr *E = IgnoreParens();

clang/lib/AST/TextNodeDumper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,6 +2189,11 @@ void TextNodeDumper::VisitEnumDecl(const EnumDecl *D) {
21892189
OS << " __module_private__";
21902190
if (D->isFixed())
21912191
dumpType(D->getIntegerType());
2192+
2193+
if (const auto *Instance = D->getInstantiatedFromMemberEnum()) {
2194+
OS << " instantiated_from";
2195+
dumpPointer(Instance);
2196+
}
21922197
}
21932198

21942199
void TextNodeDumper::VisitRecordDecl(const RecordDecl *D) {

0 commit comments

Comments
 (0)