Skip to content

Commit 5b9fc44

Browse files
committed
[clang] Add a C++17 deduction guide testcase.
From https://bugs.llvm.org/show_bug.cgi?id=47219. It was crashing before the commit 1e14588. Differential Revision: https://reviews.llvm.org/D92573
1 parent e2fc11c commit 5b9fc44

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Test with pch.
2+
// RUN: %clang_cc1 -emit-pch -std=c++17 -o %t %s
3+
// RUN: %clang_cc1 -include-pch %t -emit-llvm -std=c++17 -o - %s
4+
5+
#ifndef HEADER
6+
#define HEADER
7+
8+
namespace RP47219 {
9+
typedef int MyInt;
10+
template <typename T>
11+
class Some {
12+
public:
13+
explicit Some(T, MyInt) {}
14+
};
15+
16+
struct Foo {};
17+
void ParseNatural() {
18+
Some(Foo(), 1);
19+
}
20+
}
21+
22+
#else
23+
24+
#endif

0 commit comments

Comments
 (0)