blob: c28320db95616ce795e769776e9fa5cb9c19f32a [file] [log] [blame]
Stephan Tolksdorfe96f8b32014-03-15 10:23:27 +00001// 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
12template <typename T>
13using Id = T;
14
15template <typename X>
16struct Class1 {
17 template <typename Y, typename = decltype(Y())>
18 struct Nested1;
19};
20
21template <typename A>
22struct Class2 {
23 template <typename B, typename = Id<decltype(B())>>
24 struct Nested2;
25};
26
27#else
28
29Class2<char> test;
30
31#endif