aboutsummaryrefslogtreecommitdiff
path: root/test/TableGen/ListSlices.td
blob: cbb2326a95c003952d0a0960c34778ea6298ef8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: llvm-tblgen %s
// XFAIL: vg_leak

def A {
  list<int> B = [10, 20, 30, 4, 1, 1231, 20];
}

def B {
  list<int> X = [10, 20, 30, 4, 1, 1231, 20] [2-4,2,2,0-6];

  list<int> Y = X[4,5];
  int Z = X[4];

  list<int> C = A.B[1-4];

  list<list<int>> AA = [X, Y];

  int BB = AA[0][1];
}