1 // RUN: llvm-tblgen %s | FileCheck %s
3 // CHECK: class X<list<int> X:a = ?, list<int> X:b = ?, list<int> X:c = ?> {
4 // CHECK: list<int> x = !listconcat(!listconcat(X:a, X:b), !listconcat(X:b, X:c));
7 // CHECK: class Y<list<string> Y:S = ?> {
8 // CHECK: list<string> T1 = !listconcat(Y:S, ["foo"]);
9 // CHECK: list<string> T2 = !listconcat(Y:S, !listconcat(["foo"], !listconcat(Y:S, ["bar", "baz"])));
13 // CHECK: list<int> lst = [4];
17 // CHECK: list<int> lst = [];
21 // CHECK: list<int> x = [0, 1, 1, 2]
25 // CHECK: list<string> T1 = ["fu", "foo"];
26 // CHECK: list<string> T2 = ["fu", "foo", "fu", "bar", "baz"];
30 // The empty lists type-check without issues.
31 list<int> lst = !listconcat([], !if(x, [], [4]));
37 class X<list<int> a, list<int> b, list<int> c> {
38 list<int> x = !listconcat(!listconcat(a, b), !listconcat(b, c));
41 class Y<list<string> S> {
42 list<string> T1 = !listconcat(S, ["foo"]);
43 list<string> T2 = !listconcat(S, ["foo"], S, ["bar", "baz"]);
46 def DX : X<[0], [1], [2]>;