Skip to content

Commit 0051216

Browse files
committed
merge main into amd-staging
2 parents 9d6e50c + f8f23e8 commit 0051216

Some content is hidden

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

50 files changed

+524
-300
lines changed

.github/new-prs-labeler.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ LTO:
9090
- llvm/lib/Transforms/*/FunctionImport*
9191
- llvm/tools/gold/**
9292

93-
mc:
94-
- llvm/*/MC/**
95-
9693
clang:driver:
9794
- clang/*/Driver/**
9895

@@ -621,6 +618,12 @@ llvm:adt:
621618
llvm:support:
622619
- llvm/**/Support/**
623620

621+
# Skip llvm/test/MC and llvm/unittests/MC, which includes target-specific directories.
622+
llvm:mc:
623+
- llvm/include/llvm/MC/**
624+
- llvm/lib/MC/**
625+
- llvm/tools/llvm-mc/**
626+
624627
llvm:transforms:
625628
- llvm/lib/Transforms/**
626629
- llvm/include/llvm/Transforms/**
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %check_clang_tidy -std=c++20 %s modernize-type-traits %t
2+
3+
namespace std {
4+
template <class> struct tuple_size {
5+
static const int value = 1;
6+
};
7+
template <int, class> struct tuple_element {
8+
using type = int;
9+
};
10+
}
11+
12+
struct A {};
13+
template <int> int get(const A&);
14+
15+
auto [a] = A();

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,10 +1373,13 @@ static bool checkTupleLikeDecomposition(Sema &S,
13731373
S.BuildReferenceType(T, E.get()->isLValue(), Loc, B->getDeclName());
13741374
if (RefType.isNull())
13751375
return true;
1376-
auto *RefVD = VarDecl::Create(
1377-
S.Context, Src->getDeclContext(), Loc, Loc,
1378-
B->getDeclName().getAsIdentifierInfo(), RefType,
1379-
S.Context.getTrivialTypeSourceInfo(T, Loc), Src->getStorageClass());
1376+
1377+
// Don't give this VarDecl a TypeSourceInfo, since this is a synthesized
1378+
// entity and this type was never written in source code.
1379+
auto *RefVD =
1380+
VarDecl::Create(S.Context, Src->getDeclContext(), Loc, Loc,
1381+
B->getDeclName().getAsIdentifierInfo(), RefType,
1382+
/*TInfo=*/nullptr, Src->getStorageClass());
13801383
RefVD->setLexicalDeclContext(Src->getLexicalDeclContext());
13811384
RefVD->setTSCSpec(Src->getTSCSpec());
13821385
RefVD->setImplicit();

clang/test/Analysis/anonymous-decls.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ int main() {
7878
// CHECK-NEXT: 8: decomposition-a-b
7979
// CHECK-NEXT: 9: [B3.7]([B3.8])
8080
// CHECK-NEXT: 10: [B3.9]
81-
// CHECK-NEXT: 11: std::tuple_element<0UL, std::pair<int, int>>::type a = get<0UL>(decomposition-a-b);
81+
// CHECK-NEXT: 11: std::tuple_element<0UL, std::pair<int, int>>::type &&a = get<0UL>(decomposition-a-b);
8282
// CHECK-NEXT: 12: get<1UL>
8383
// CHECK-NEXT: 13: [B3.12] (ImplicitCastExpr, FunctionToPointerDecay, tuple_element<1L, pair<int, int> >::type (*)(pair<int, int> &))
8484
// CHECK-NEXT: 14: decomposition-a-b
8585
// CHECK-NEXT: 15: [B3.13]([B3.14])
8686
// CHECK-NEXT: 16: [B3.15]
87-
// CHECK-NEXT: 17: std::tuple_element<1UL, std::pair<int, int>>::type b = get<1UL>(decomposition-a-b);
87+
// CHECK-NEXT: 17: std::tuple_element<1UL, std::pair<int, int>>::type &&b = get<1UL>(decomposition-a-b);
8888
// CHECK-NEXT: Preds (1): B1
8989
// CHECK-NEXT: Succs (1): B2

clang/test/Interpreter/assignment-with-implicit-ctor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: host-supports-jit
2-
// UNSUPPORTED: system-aix
32
//
43
// RUN: cat %s | clang-repl | FileCheck %s
54
// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s

clang/test/Interpreter/bad_percent_command.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// UNSUPPORTED: system-aix
21
// RUN: cat %s | clang-repl 2>&1 | FileCheck %s
32
%foobar
43
// CHECK: Invalid % command "%foobar", use "%help" to list commands

clang/test/Interpreter/code-undo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// UNSUPPORTED: system-aix
21
// RUN: cat %s | clang-repl | FileCheck %s
32
extern "C" int printf(const char *, ...);
43
int x1 = 0;

clang/test/Interpreter/const.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// UNSUPPORTED: system-aix, system-zos
21
// see https://github.com/llvm/llvm-project/issues/68092
32
// XFAIL: host={{.*}}-windows-msvc
43

clang/test/Interpreter/cxx20-modules.cppm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: host-supports-jit, x86_64-linux
2-
// UNSUPPORTED: system-aix
32
//
43
// RUN: rm -rf %t
54
// RUN: mkdir -p %t

clang/test/Interpreter/dynamic-library-bad-args.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// UNSUPPORTED: system-aix
21
// RUN: cat %s | clang-repl 2>&1 | FileCheck %s
32
%lib
43
// CHECK: %lib expects 1 argument: the path to a dynamic library

0 commit comments

Comments
 (0)