Skip to content

Commit 873d67d

Browse files
committed
merge main into amd-staging
2 parents 746dfb4 + 6af2c18 commit 873d67d

File tree

25 files changed

+1312
-131
lines changed

25 files changed

+1312
-131
lines changed

clang/docs/OpenMPSupport.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ implementation.
499499
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
500500
|Feature | C/C++ Status | Fortran Status | Reviews |
501501
+=============================================================+===========================+===========================+==========================================================================+
502-
| | | | |
502+
| dyn_groupprivate clause | :part:`In Progress` | :part:`In Progress` | C/C++: kevinsala (https://github.com/llvm/llvm-project/pull/152651 |
503+
| | | | https://github.com/llvm/llvm-project/pull/152830 |
504+
| | | | https://github.com/llvm/llvm-project/pull/152831) |
503505
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
504506

505507

clang/lib/Sema/SemaDecl.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5291,10 +5291,8 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS,
52915291
// UNION_TYPE; <- where UNION_TYPE is a typedef union.
52925292
if ((Tag && Tag->getDeclName()) ||
52935293
DS.getTypeSpecType() == DeclSpec::TST_typename) {
5294-
RecordDecl *Record = dyn_cast_or_null<RecordDecl>(Tag);
5295-
if (!Record)
5296-
Record = DS.getRepAsType().get()->getAsRecordDecl();
5297-
5294+
RecordDecl *Record = Tag ? dyn_cast<RecordDecl>(Tag)
5295+
: DS.getRepAsType().get()->getAsRecordDecl();
52985296
if (Record && getLangOpts().MicrosoftExt) {
52995297
Diag(DS.getBeginLoc(), diag::ext_ms_anonymous_record)
53005298
<< Record->isUnion() << DS.getSourceRange();
@@ -18571,8 +18569,14 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
1857118569
if (PrevDecl)
1857218570
CheckRedeclarationInModule(New, PrevDecl);
1857318571

18574-
if (TUK == TagUseKind::Definition && (!SkipBody || !SkipBody->ShouldSkip))
18575-
New->startDefinition();
18572+
if (TUK == TagUseKind::Definition) {
18573+
if (!SkipBody || !SkipBody->ShouldSkip) {
18574+
New->startDefinition();
18575+
} else {
18576+
New->setCompleteDefinition();
18577+
New->demoteThisDefinitionToDeclaration();
18578+
}
18579+
}
1857618580

1857718581
ProcessDeclAttributeList(S, New, Attrs);
1857818582
AddPragmaAttributes(S, New);

clang/lib/Sema/SemaType.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9878,7 +9878,14 @@ static QualType GetEnumUnderlyingType(Sema &S, QualType BaseType,
98789878
S.DiagnoseUseOfDecl(ED, Loc);
98799879

98809880
QualType Underlying = ED->getIntegerType();
9881-
assert(!Underlying.isNull());
9881+
if (Underlying.isNull()) {
9882+
// This is an enum without a fixed underlying type which we skipped parsing
9883+
// the body because we saw its definition previously in another module.
9884+
// Use the definition's integer type in that case.
9885+
assert(ED->isThisDeclarationADemotedDefinition());
9886+
Underlying = ED->getDefinition()->getIntegerType();
9887+
assert(!Underlying.isNull());
9888+
}
98829889

98839890
return Underlying;
98849891
}

clang/test/Modules/GH155028-1.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %clang_cc1 -std=c++20 -verify %s
2+
// expected-no-diagnostics
3+
4+
#pragma clang module build M
5+
module "M" {
6+
module "A" {}
7+
module "B" {}
8+
}
9+
#pragma clang module contents
10+
#pragma clang module begin M.A
11+
enum E1 {};
12+
#pragma clang module end
13+
#pragma clang module begin M.B
14+
enum E1 {};
15+
using T = __underlying_type(E1);
16+
#pragma clang module end
17+
#pragma clang module endbuild

clang/test/Sema/GH155794.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-everything %s
2+
3+
struct S {
4+
enum e1 {} // expected-error {{use of empty enum}} expected-error {{expected ';' after enum}}
5+
enum e2 {} // expected-error {{use of empty enum}}
6+
}; // expected-error {{expected member name or ';' after declaration specifiers}}

compiler-rt/lib/builtins/cpu_model/aarch64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ typedef struct __ifunc_arg_t {
3434
_Bool __aarch64_have_lse_atomics
3535
__attribute__((visibility("hidden"), nocommon)) = false;
3636

37-
#if defined(__FreeBSD__)
37+
#if defined(__FreeBSD__) || defined(__OpenBSD__)
3838
// clang-format off: should not reorder sys/auxv.h alphabetically
3939
#include <sys/auxv.h>
4040
// clang-format on
@@ -68,7 +68,7 @@ struct {
6868
// clang-format off
6969
#if defined(__APPLE__)
7070
#include "aarch64/fmv/apple.inc"
71-
#elif defined(__FreeBSD__)
71+
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
7272
#include "aarch64/fmv/mrs.inc"
7373
#include "aarch64/fmv/elf_aux_info.inc"
7474
#elif defined(__Fuchsia__)

libc/config/gpu/amdgpu/config.json renamed to libc/config/gpu/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"math": {
4141
"LIBC_CONF_MATH_OPTIMIZATIONS": {
42-
"value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
42+
"value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
4343
}
4444
}
4545
}

libc/config/gpu/nvptx/config.json

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

libc/test/src/math/smoke/TotalOrderTest.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ class TotalOrderTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
104104
}
105105

106106
void testNaNPayloads(TotalOrderFunc func) {
107-
108-
T qnan_0x15 = FPBits::quiet_nan(Sign::POS, 0x15).get_val();
109-
T neg_qnan_0x15 = FPBits::quiet_nan(Sign::NEG, 0x15).get_val();
110-
T snan_0x15 = FPBits::signaling_nan(Sign::POS, 0x15).get_val();
111-
T neg_snan_0x15 = FPBits::signaling_nan(Sign::NEG, 0x15).get_val();
112-
113107
EXPECT_TRUE(funcWrapper(func, aNaN, aNaN));
114108
EXPECT_TRUE(funcWrapper(func, sNaN, sNaN));
115109

lldb/source/Protocol/MCP/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_lldb_library(lldbProtocolMCP NO_PLUGIN_DEPENDENCIES
77
LINK_COMPONENTS
88
Support
99
LINK_LIBS
10+
lldbHost
1011
lldbUtility
1112
)
1213

0 commit comments

Comments
 (0)