From a88620c0d15d380975eb2c4c9251cd6ff8d2aa64 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 18 Mar 2009 20:26:44 +0000 Subject: [PATCH] added type dependent testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67230 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaTemplate/instantiate-expr-2.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/test/SemaTemplate/instantiate-expr-2.cpp b/test/SemaTemplate/instantiate-expr-2.cpp index 7cfaa9c8ee..b2c43ee76e 100644 --- a/test/SemaTemplate/instantiate-expr-2.cpp +++ b/test/SemaTemplate/instantiate-expr-2.cpp @@ -84,9 +84,9 @@ namespace N5 { */ namespace N6 { + // non-typedependent template - struct Lookup { - }; + struct Lookup {}; template struct Cond { @@ -103,3 +103,20 @@ namespace N6 { } +namespace N7 { + // type dependent + template + struct Lookup {}; + + template + struct Cond { + T foo() { return B ? T() : E(); } + typedef Lookup Type; + }; + + //Cond C; // Errors + //int V(C.foo()); // Errors + //typedef Cond::Type Type; // Errors + CRASHES! + typedef Cond::Type Type; +} + -- 2.40.0