From: Gabor Greif Date: Wed, 18 Mar 2009 20:26:44 +0000 (+0000) Subject: added type dependent testcase X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a88620c0d15d380975eb2c4c9251cd6ff8d2aa64;p=clang added type dependent testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67230 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; +} +