Skip to content

Commit 09215de

Browse files
committed
move cases that cause code generation failures to the appropriate folder
1 parent 3fffde4 commit 09215de

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

clang/test/CXX/temp/temp.res/p4.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -199,32 +199,9 @@ template <typename T> struct S2 {
199199
friend void f3(S2, int a = alias<T &>(1)); // expected-error {{friend declaration specifying a default argument must be a definition}}
200200
};
201201

202-
struct S3 {
203-
friend void f4(S3, int = 42) { }
204-
};
205-
206-
template <bool, class> using __enable_if_t = int;
207-
template <int v> struct S4 {
208-
static const int value = v;
209-
};
210-
struct S5 {
211-
template <__enable_if_t<S4<true>::value, int> = 0>
212-
S5(const char *);
213-
};
214-
struct S6 {
215-
template <typename a, typename b>
216-
friend void f5(int, S6, a, b, S5 = "") { }
217-
};
218-
219202
void test() {
220203
f1(S1<>{});
221204
f2(S1<>{});
222205
f3(S2<void>());
223-
224-
S3 s3;
225-
f4(s3);
226-
227-
S6 s6;
228-
auto result = f5(0, s6, [] {}, [] {}); // expected-error {{variable has incomplete type 'void}}
229206
}
230207
} // namespace GH113324

clang/test/CodeGenCXX/default-arguments.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,31 @@ void g() {
1212
}
1313
}
1414

15+
namespace GH113324 {
16+
struct S1 {
17+
friend void f1(S1, int = 42) {}
18+
};
19+
20+
template <bool, class> using __enable_if_t = int;
21+
template <int v> struct S2 {
22+
static const int value = v;
23+
};
24+
struct S3 {
25+
template <__enable_if_t<S2<true>::value, int> = 0> S3(const char *);
26+
};
27+
struct S4 {
28+
template <typename a, typename b> friend void f2(int, S4, a, b, S3 = "") {}
29+
};
30+
31+
void test() {
32+
S1 s1;
33+
f1(s1);
34+
35+
S4 s4;
36+
f2(0, s4, [] {}, [] {});
37+
}
38+
}
39+
1540
struct A1 {
1641
A1();
1742
~A1();

0 commit comments

Comments
 (0)