Skip to content

Commit ec138c7

Browse files
authored
[OpenACC] Improve C++20 compatibility of private/firstprivate test (#152233)
Under C++17, `DeletedCopy` and `DefaultedCopy` in the test `clang/test/SemaOpenACC/private_firstprivate_reduction_required_ops.cpp` are eligible for aggregate initialization. Under C++20 and up, that is no longer the case. Therefore, an explicit constructor must be declared to avoid additional diagnostics which the test does not expect. This test was failing in our downstream testing where our toolchain uses C++20 as the default dialect. See this reduced example for more details: https://godbolt.org/z/46oErYT43
1 parent bb2642f commit ec138c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/test/SemaOpenACC/private_firstprivate_reduction_required_ops.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ struct ImplicitDelDtor {
3737
};
3838

3939
struct DeletedCopy {
40+
DeletedCopy();
4041
DeletedCopy(const DeletedCopy&) = delete;
4142
};
4243

4344
struct DefaultedCopy {
45+
DefaultedCopy();
4446
DefaultedCopy(const DefaultedCopy&) = default;
4547
};
4648
struct UserCopy {

0 commit comments

Comments
 (0)