| // RUN: llvm-tblgen --no-warn-on-unused-template-args %s | FileCheck %s |
| class A<int k, bits<2> x = 1> { |
| // CHECK: Bits = { 0, 1 } |
| // CHECK: Bits = { 1, 0 } |
| // Here was the bug: X.Bits would get resolved to the default a1.Bits while |
| // resolving the first template argument. When the second template argument |
| // was processed, X would be set correctly, but Bits retained the default |
| class B<int k, A x = a1> { |
| // CHECK: Bits = { 0, 1 } |
| // CHECK: Bits = { 1, 0 } |
| // CHECK: Bits = { 0, 1 } |
| // CHECK: Bits = { 1, 0 } |