Skip to content

Commit ca1ec79

Browse files
Jenkinsronlieb
authored andcommitted
merge main into amd-staging
Revert "[libc++abi] Improve error message when libunwind is missing from LLVM_ENABLE_RUNTIMES (llvm#77991)" Change-Id: Ie6dcb219cff4beac5b6cf6d9fafc5757cc7a08e3
2 parents 622be37 + d0708e6 commit ca1ec79

File tree

173 files changed

+6355
-5708
lines changed

Some content is hidden

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

173 files changed

+6355
-5708
lines changed

clang/include/clang/Basic/DiagnosticCommonKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
358358
def err_file_modified : Error<
359359
"file '%0' modified since it was first processed">, DefaultFatal;
360360
def err_file_too_large : Error<
361-
"sorry, unsupported: file '%0' is too large for Clang to process">;
361+
"file '%0' is too large for Clang to process">;
362362
def err_sloc_space_too_large : Error<
363-
"sorry, the translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
363+
"translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
364364
def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
365365
"encoding is not supported">, DefaultFatal;
366366
def err_unable_to_rename_temp : Error<

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5145,7 +5145,7 @@ def err_non_type_template_arg_subobject : Error<
51455145
def err_non_type_template_arg_addr_label_diff : Error<
51465146
"template argument / label address difference / what did you expect?">;
51475147
def err_non_type_template_arg_unsupported : Error<
5148-
"sorry, non-type template argument of type %0 is not yet supported">;
5148+
"non-type template argument of type %0 is not yet supported">;
51495149
def err_template_arg_not_convertible : Error<
51505150
"non-type template argument of type %0 cannot be converted to a value "
51515151
"of type %1">;
@@ -5198,7 +5198,7 @@ def err_template_arg_not_object_or_func : Error<
51985198
def err_template_arg_not_pointer_to_member_form : Error<
51995199
"non-type template argument is not a pointer to member constant">;
52005200
def err_template_arg_member_ptr_base_derived_not_supported : Error<
5201-
"sorry, non-type template argument of pointer-to-member type %1 that refers "
5201+
"non-type template argument of pointer-to-member type %1 that refers "
52025202
"to member %q0 of a different class is not supported yet">;
52035203
def err_template_arg_invalid : Error<
52045204
"non-type template argument '%0' is invalid">;
@@ -9932,10 +9932,10 @@ def warn_new_dangling_initializer_list : Warning<
99329932
"will be destroyed at the end of the full-expression">,
99339933
InGroup<DanglingInitializerList>;
99349934
def warn_unsupported_lifetime_extension : Warning<
9935-
"sorry, lifetime extension of "
9935+
"lifetime extension of "
99369936
"%select{temporary|backing array of initializer list}0 created "
9937-
"by aggregate initialization using default member initializer "
9938-
"is not supported; lifetime of %select{temporary|backing array}0 "
9937+
"by aggregate initialization using a default member initializer "
9938+
"is not yet supported; lifetime of %select{temporary|backing array}0 "
99399939
"will end at the end of the full-expression">, InGroup<Dangling>;
99409940

99419941
// For non-floating point, expressions of the form x == x or x != x

clang/include/clang/Basic/arm_sve.td

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,9 +1296,9 @@ def SVCREATE_3_BF16 : SInst<"svcreate3[_{d}]", "3ddd", "b", MergeNone, "", [IsT
12961296
def SVCREATE_4_BF16 : SInst<"svcreate4[_{d}]", "4dddd", "b", MergeNone, "", [IsTupleCreate]>;
12971297
}
12981298

1299-
let TargetGuard = "sve2p1" in {
1300-
def SVCREATE_2_B : SInst<"svcreate2[_{d}]", "2dd", "Pc", MergeNone, "", [IsTupleCreate]>;
1301-
def SVCREATE_4_B : SInst<"svcreate4[_{d}]", "4dddd", "Pc", MergeNone, "", [IsTupleCreate]>;
1299+
let TargetGuard = "sve2p1|sme2" in {
1300+
def SVCREATE_2_B : SInst<"svcreate2[_b]", "2dd", "Pc", MergeNone, "", [IsTupleCreate, IsStreamingCompatible]>;
1301+
def SVCREATE_4_B : SInst<"svcreate4[_b]", "4dddd", "Pc", MergeNone, "", [IsTupleCreate, IsStreamingCompatible]>;
13021302
}
13031303

13041304
////////////////////////////////////////////////////////////////////////////////
@@ -1321,12 +1321,17 @@ def SVSET_3_BF16 : SInst<"svset3[_{d}]", "33id", "b", MergeNone, "", [IsTupleSet
13211321
def SVSET_4_BF16 : SInst<"svset4[_{d}]", "44id", "b", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_3>]>;
13221322
}
13231323

1324-
let TargetGuard = "sve2p1" in {
1325-
def SVGET_2_B : SInst<"svget2[_{d}]", "d2i", "Pc", MergeNone, "", [IsTupleGet], [ImmCheck<1, ImmCheck0_1>]>;
1326-
def SVGET_4_B : SInst<"svget4[_{d}]", "d4i", "Pc", MergeNone, "", [IsTupleGet], [ImmCheck<1, ImmCheck0_3>]>;
1324+
let TargetGuard = "sve2p1|sme2" in {
1325+
def SVGET_2_B : SInst<"svget2[_b]", "d2i", "Pc", MergeNone, "", [IsTupleGet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
1326+
def SVGET_4_B : SInst<"svget4[_b]", "d4i", "Pc", MergeNone, "", [IsTupleGet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
13271327

1328-
def SVSET_2_B : SInst<"svset2[_{d}]", "22id", "Pc", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_1>]>;
1329-
def SVSET_4_B : SInst<"svset4[_{d}]", "44id", "Pc", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_3>]>;
1328+
def SVSET_2_B : SInst<"svset2[_b]", "22id", "Pc", MergeNone, "", [IsTupleSet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
1329+
def SVSET_4_B : SInst<"svset4[_b]", "44id", "Pc", MergeNone, "", [IsTupleSet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
1330+
}
1331+
1332+
let TargetGuard = "sve2p1|sme2" in {
1333+
def SVUNDEF_2_B: Inst<"svundef2_b", "2", "Pc", MergeNone, "", [IsUndef, IsStreamingCompatible], []>;
1334+
def SVUNDEF_4_B: Inst<"svundef4_b", "4", "Pc", MergeNone, "", [IsUndef, IsStreamingCompatible], []>;
13301335
}
13311336
////////////////////////////////////////////////////////////////////////////////
13321337
// SVE2 WhileGE/GT

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2768,7 +2768,8 @@ bool ByteCodeExprGen<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
27682768
return false;
27692769
return DiscardResult ? this->emitPop(*T, E) : this->emitComp(*T, E);
27702770
case UO_Real: { // __real x
2771-
assert(!T);
2771+
if (T)
2772+
return this->delegate(SubExpr);
27722773
if (!this->visit(SubExpr))
27732774
return false;
27742775
if (!this->emitConstUint8(0, E))
@@ -2783,7 +2784,11 @@ bool ByteCodeExprGen<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
27832784
return true;
27842785
}
27852786
case UO_Imag: { // __imag x
2786-
assert(!T);
2787+
if (T) {
2788+
if (!this->discard(SubExpr))
2789+
return false;
2790+
return this->visitZeroInitializer(*T, SubExpr->getType(), SubExpr);
2791+
}
27872792
if (!this->visit(SubExpr))
27882793
return false;
27892794
if (!this->emitConstUint8(1, E))

clang/lib/CodeGen/CGCleanup.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ struct EHPersonality {
613613
static const EHPersonality MSVC_CxxFrameHandler3;
614614
static const EHPersonality GNU_Wasm_CPlusPlus;
615615
static const EHPersonality XL_CPlusPlus;
616+
static const EHPersonality ZOS_CPlusPlus;
616617

617618
/// Does this personality use landingpads or the family of pad instructions
618619
/// designed to form funclets?

clang/lib/CodeGen/CGException.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ const EHPersonality
127127
EHPersonality::GNU_Wasm_CPlusPlus = { "__gxx_wasm_personality_v0", nullptr };
128128
const EHPersonality EHPersonality::XL_CPlusPlus = {"__xlcxx_personality_v1",
129129
nullptr};
130+
const EHPersonality EHPersonality::ZOS_CPlusPlus = {"__zos_cxx_personality_v2",
131+
nullptr};
130132

131133
static const EHPersonality &getCPersonality(const TargetInfo &Target,
132134
const LangOptions &L) {
@@ -187,6 +189,8 @@ static const EHPersonality &getCXXPersonality(const TargetInfo &Target,
187189
return EHPersonality::GNU_CPlusPlus_SEH;
188190
if (L.hasWasmExceptions())
189191
return EHPersonality::GNU_Wasm_CPlusPlus;
192+
if (T.isOSzOS())
193+
return EHPersonality::ZOS_CPlusPlus;
190194
return EHPersonality::GNU_CPlusPlus;
191195
}
192196

clang/lib/Format/Format.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,8 +1701,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
17011701
/*BasedOnStyle=*/"google",
17021702
},
17031703
};
1704-
GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
1705-
GoogleStyle.AttributeMacros.push_back("ABSL_GUARDED_BY");
17061704

17071705
GoogleStyle.SpacesBeforeTrailingComments = 2;
17081706
GoogleStyle.Standard = FormatStyle::LS_Auto;

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,8 @@ class AnnotatingParser {
22092209
(!NextNonComment && !Line.InMacroBody) ||
22102210
(NextNonComment &&
22112211
(NextNonComment->isPointerOrReference() ||
2212-
NextNonComment->isOneOf(tok::identifier, tok::string_literal)))) {
2212+
NextNonComment->is(tok::string_literal) ||
2213+
(Line.InPragmaDirective && NextNonComment->is(tok::identifier))))) {
22132214
return false;
22142215
}
22152216

clang/lib/Headers/llvm_libc_wrappers/string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ char *strcpy(char *__restrict, const char *__restrict) __LIBC_ATTRS;
6767
size_t strcspn(const char *, const char *) __LIBC_ATTRS;
6868
char *strdup(const char *) __LIBC_ATTRS;
6969
size_t strlen(const char *) __LIBC_ATTRS;
70-
char *strncat(char *, const char *, size_t) __LIBC_ATTRS;
70+
char *strncat(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
7171
int strncmp(const char *, const char *, size_t) __LIBC_ATTRS;
7272
char *strncpy(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;
7373
char *strndup(const char *, size_t) __LIBC_ATTRS;
7474
size_t strnlen(const char *, size_t) __LIBC_ATTRS;
7575
size_t strspn(const char *, const char *) __LIBC_ATTRS;
76-
char *strtok(char *__restrict, const char *) __LIBC_ATTRS;
76+
char *strtok(char *__restrict, const char *__restrict) __LIBC_ATTRS;
7777
char *strtok_r(char *__restrict, const char *__restrict,
7878
char **__restrict) __LIBC_ATTRS;
7979
size_t strxfrm(char *__restrict, const char *__restrict, size_t) __LIBC_ATTRS;

clang/test/AST/Interp/complex.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ constexpr _Complex int I2 = {};
3737
static_assert(__real(I2) == 0, "");
3838
static_assert(__imag(I2) == 0, "");
3939

40+
static_assert(__real(4.0) == 4.0, "");
41+
static_assert(__real(12u) == 12u, "");
42+
static_assert(__imag(4.0) == 0.0, "");
43+
static_assert(__imag(13) == 0, "");
44+
45+
4046

4147
/// Standalone complex expressions.
4248
static_assert(__real((_Complex float){1.0, 3.0}) == 1.0, "");

0 commit comments

Comments
 (0)