comparison clang/test/PCH/pr18806.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
2 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
3
4 // expected-no-diagnostics
5
6 // Before the patch, this test triggered an assert violation in
7 // ASTContext::getSubstTemplateTypeParmType.
8
9 #ifndef HEADER_INCLUDED
10 #define HEADER_INCLUDED
11
12 template <typename T>
13 using Id = T;
14
15 template <typename X>
16 struct Class1 {
17 template <typename Y, typename = decltype(Y())>
18 struct Nested1;
19 };
20
21 template <typename A>
22 struct Class2 {
23 template <typename B, typename = Id<decltype(B())>>
24 struct Nested2;
25 };
26
27 #else
28
29 Class2<char> test;
30
31 #endif