Home | History | Annotate | Download | only in PCH
      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
     32