Peter Collingbourne | 5d5c062 | 2011-10-06 13:39:59 +0000 | [diff] [blame] | 1 | // RUN: llvm-tblgen < %s |
Jeffrey Yasskin | 32989de | 2010-03-20 23:08:45 +0000 | [diff] [blame] | 2 | // XFAIL: vg_leak |
Chris Lattner | 7b6ee7d | 2004-02-28 16:43:44 +0000 | [diff] [blame] | 3 | // Test for template arguments that have the same name as superclass template |
| 4 | // arguments. |
| 5 | |
| 6 | |
| 7 | class Arg { int a; } |
Chris Lattner | eb7d6d0 | 2004-02-28 17:33:21 +0000 | [diff] [blame] | 8 | def TheArg : Arg { let a = 1; } |
Chris Lattner | 7b6ee7d | 2004-02-28 16:43:44 +0000 | [diff] [blame] | 9 | |
| 10 | |
| 11 | class Super<Arg F> { |
| 12 | int X = F.a; |
| 13 | } |
| 14 | class Sub<Arg F> : Super<F>; |
| 15 | def inst : Sub<TheArg>; |
| 16 | |
| 17 | |
| 18 | class Super2<int F> { |
| 19 | int X = F; |
| 20 | } |
| 21 | class Sub2<int F> : Super2<F>; |