forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged main:772b1b0cb26c66804d0a7e416dc7a5742b7f8db2 into amd-gfx:431…
…25be5ad0d Local branch amd-gfx 43125be Merged main:f97f039e0bb7bb60c9cc437f678059c5ee19c8da into amd-gfx:ce126627c1f0 Remote branch main 772b1b0 [scudo] Move the chunk update into functions (llvm#83493)
- Loading branch information
Showing
53 changed files
with
873 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.partial/p3.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -verify %s | ||
// expected-no-diagnostics | ||
|
||
template<bool B> | ||
struct A { }; | ||
|
||
constexpr A<false> a; | ||
constexpr A<false> b; | ||
|
||
constexpr int* x = nullptr; | ||
constexpr short* y = nullptr; | ||
|
||
namespace ExplicitArgs { | ||
template<typename T, typename U> | ||
constexpr int f(U) noexcept(noexcept(T())) { | ||
return 0; | ||
} | ||
|
||
template<typename T> | ||
constexpr int f(T*) noexcept { | ||
return 1; | ||
} | ||
|
||
template<> | ||
constexpr int f<int>(int*) noexcept { | ||
return 2; | ||
} | ||
|
||
static_assert(f<int>(1) == 0); | ||
static_assert(f<short>(y) == 1); | ||
static_assert(f<int>(x) == 2); | ||
|
||
template<typename T, typename U> | ||
constexpr int g(U*) noexcept(noexcept(T())) { | ||
return 3; | ||
} | ||
|
||
template<typename T> | ||
constexpr int g(T) noexcept { | ||
return 4; | ||
} | ||
|
||
template<> | ||
constexpr int g<int>(int*) noexcept { | ||
return 5; | ||
} | ||
|
||
static_assert(g<int>(y) == 3); | ||
static_assert(g<short>(1) == 4); | ||
static_assert(g<int>(x) == 5); | ||
} // namespace ExplicitArgs | ||
|
||
namespace DeducedArgs { | ||
template<typename T, bool B> | ||
constexpr int f(T, A<B>) noexcept(B) { | ||
return 0; | ||
} | ||
|
||
template<typename T, bool B> | ||
constexpr int f(T*, A<B>) noexcept(B && B) { | ||
return 1; | ||
} | ||
|
||
template<> | ||
constexpr int f(int*, A<false>) { | ||
return 2; | ||
} | ||
|
||
static_assert(f<int*>(x, a) == 0); | ||
static_assert(f<short>(y, a) == 1); | ||
static_assert(f<int>(x, a) == 2); | ||
} // namespace DeducedArgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false -triple %itanium_abi_triple -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s | FileCheck %s | ||
|
||
// CHECK-LABEL: _Z19array_decompositioni: | ||
// CHECK-NEXT: File 0, [[@LINE+6]]:32 -> {{[0-9]+}}:2 = #0 | ||
// CHECK-NEXT: File 0, [[@LINE+8]]:20 -> [[@LINE+8]]:25 = #0 | ||
// CHECK-NEXT: Branch,File 0, [[@LINE+7]]:20 -> [[@LINE+7]]:25 = #1, (#0 - #1) | ||
// CHECK-NEXT: Gap,File 0, [[@LINE+6]]:27 -> [[@LINE+6]]:28 = #1 | ||
// CHECK-NEXT: File 0, [[@LINE+5]]:28 -> [[@LINE+5]]:29 = #1 | ||
// CHECK-NEXT: File 0, [[@LINE+4]]:32 -> [[@LINE+4]]:33 = (#0 - #1) | ||
int array_decomposition(int i) { | ||
int a[] = {1, 2, 3}; | ||
int b[] = {4, 5, 6}; | ||
auto [x, y, z] = i > 0 ? a : b; | ||
return x + y + z; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// RUN: %clang -fsyntax-only -### %s 2>&1 | FileCheck --check-prefix=CHECK-DEF %s | ||
// RUN: %clang -fsyntax-only -frelaxed-template-template-args %s 2>&1 | FileCheck --check-prefix=CHECK-ON %s | ||
// RUN: %clang -fsyntax-only -fno-relaxed-template-template-args %s 2>&1 | FileCheck --check-prefix=CHECK-OFF %s | ||
// RUN: %clang -fsyntax-only -fno-relaxed-template-template-args -Wno-deprecated-no-relaxed-template-template-args %s 2>&1 | FileCheck --check-prefix=CHECK-DIS --allow-empty %s | ||
|
||
// CHECK-DEF-NOT: "-cc1"{{.*}} "-fno-relaxed-template-template-args" | ||
// CHECK-ON: warning: argument '-frelaxed-template-template-args' is deprecated [-Wdeprecated] | ||
// CHECK-OFF: warning: argument '-fno-relaxed-template-template-args' is deprecated [-Wdeprecated] | ||
// CHECK-OFF: warning: argument '-fno-relaxed-template-template-args' is deprecated [-Wdeprecated-no-relaxed-template-template-args] | ||
// CHECK-DIS-NOT: warning: argument '-fno-relaxed-template-template-args' is deprecated |
Oops, something went wrong.