Skip to content

Commit 1e09f62

Browse files
committed
merge main into amd-staging
Change-Id: I4af43883e4b4d59683fc3b07efba5f326e26f223
2 parents ad51ee9 + 7603fea commit 1e09f62

File tree

109 files changed

+2423
-955
lines changed

Some content is hidden

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

109 files changed

+2423
-955
lines changed

clang/include/clang/Basic/BuiltinsLoongArchLASX.def

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

clang/include/clang/Basic/BuiltinsLoongArchLSX.def

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

clang/lib/AST/ByteCode/Interp.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,8 +3062,7 @@ inline bool BitCast(InterpState &S, CodePtr OpPC, bool TargetIsUCharOrByte,
30623062
return false;
30633063

30643064
if constexpr (std::is_same_v<T, Floating>) {
3065-
assert(Sem);
3066-
S.Stk.push<Floating>(T::bitcastFromMemory(Buff.data(), *Sem));
3065+
assert(false && "Implement bitcasting to a floating type");
30673066
} else {
30683067
assert(!Sem);
30693068
S.Stk.push<T>(T::bitcastFromMemory(Buff.data(), ResultBitWidth));

clang/lib/Format/UnwrappedLineParser.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,8 @@ void UnwrappedLineParser::parseStructuralElement(
20912091
case tok::kw_switch:
20922092
if (Style.Language == FormatStyle::LK_Java)
20932093
parseSwitch(/*IsExpr=*/true);
2094-
nextToken();
2094+
else
2095+
nextToken();
20952096
break;
20962097
case tok::kw_case:
20972098
// Proto: there are no switch/case statements.
@@ -2656,7 +2657,10 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) {
26562657
nextToken();
26572658
break;
26582659
case tok::kw_switch:
2659-
parseSwitch(/*IsExpr=*/true);
2660+
if (Style.Language == FormatStyle::LK_Java)
2661+
parseSwitch(/*IsExpr=*/true);
2662+
else
2663+
nextToken();
26602664
break;
26612665
case tok::kw_requires: {
26622666
auto RequiresToken = FormatTok;

clang/test/AST/ByteCode/builtin-bit-cast-long-double.cpp

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

clang/test/AST/ByteCode/builtin-bit-cast.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ static_assert(check_round_trip<__int128_t>((__int128_t)34));
7676
static_assert(check_round_trip<__int128_t>((__int128_t)-34));
7777
#endif
7878

79-
static_assert(check_round_trip<double>(17.0));
80-
8179

8280
namespace simple {
8381
constexpr int A = __builtin_bit_cast(int, 10);
@@ -110,7 +108,7 @@ namespace simple {
110108
static_assert(check_round_trip<unsigned>((int)0x12345678));
111109
static_assert(check_round_trip<unsigned>((int)0x87654321));
112110
static_assert(check_round_trip<unsigned>((int)0x0C05FEFE));
113-
static_assert(round_trip<float>((int)0x0C05FEFE));
111+
// static_assert(round_trip<float>((int)0x0C05FEFE));
114112

115113

116114
/// This works in GCC and in the bytecode interpreter, but the current interpreter

clang/test/Headers/lasxintrin.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64 -target-feature +lasx
2+
// RUN: not %clang_cc1 %s -fsyntax-only -triple loongarch64 -target-feature +lasx -flax-vector-conversions=none
3+
// RUN: not %clang_cc1 %s -fsyntax-only -triple loongarch64 -target-feature +lasx -flax-vector-conversions=none -fno-signed-char
4+
// FIXME: "not" should be removed once we fix GH#110834.
5+
6+
#include <lasxintrin.h>

clang/test/Headers/lsxintrin.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64 -target-feature +lsx
2+
// RUN: not %clang_cc1 %s -fsyntax-only -triple loongarch64 -target-feature +lsx -flax-vector-conversions=none
3+
// RUN: not %clang_cc1 %s -fsyntax-only -triple loongarch64 -target-feature +lsx -flax-vector-conversions=none -fno-signed-char
4+
// FIXME: "not" should be removed once we fix GH#110834.
5+
6+
#include <lsxintrin.h>

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,6 +3571,13 @@ TEST_F(TokenAnnotatorTest, TemplateInstantiation) {
35713571
EXPECT_TOKEN(Tokens[18], tok::greater, TT_TemplateCloser);
35723572
}
35733573

3574+
TEST_F(TokenAnnotatorTest, SwitchInMacroArgument) {
3575+
auto Tokens = annotate("FOOBAR(switch);\n"
3576+
"void f() {}");
3577+
ASSERT_EQ(Tokens.size(), 12u) << Tokens;
3578+
EXPECT_TOKEN(Tokens[9], tok::l_brace, TT_FunctionLBrace);
3579+
}
3580+
35743581
} // namespace
35753582
} // namespace format
35763583
} // namespace clang

libc/hdr/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ add_proxy_header_library(
8181
libc.include.signal
8282
)
8383

84+
add_proxy_header_library(
85+
stdlib_macros
86+
HDRS
87+
stdlib_macros.h
88+
DEPENDS
89+
.stdlib_overlay
90+
FULL_BUILD_DEPENDS
91+
libc.include.stdlib
92+
libc.include.llvm-libc-macros.stdlib_macros
93+
)
94+
8495
add_header_library(stdio_overlay HDRS stdio_overlay.h)
8596

8697
add_proxy_header_library(

0 commit comments

Comments
 (0)