1// Check that !cond with operands of different subtypes can 2// initialize a supertype variable. 3// RUN: llvm-tblgen --no-warn-on-unused-template-args %s | FileCheck %s 4// XFAIL: vg_leak 5 6class E<int dummy> {} 7class E1<int dummy> : E<dummy> {} 8class E2<int dummy> : E<dummy> {} 9 10class EX<int cc, E1 b, E2 c> { 11 E x = !cond(cc: b, 1 : c); 12} 13 14def E1d : E1<0>; 15def E2d : E2<0>; 16 17def EXd1 : EX<1, E1d, E2d>; 18def EXd2 : EX<0, E1d, E2d>; 19 20// CHECK: def EXd1 { 21// CHECK: E x = E1d; 22// CHECK: } 23// 24// CHECK: def EXd2 { 25// CHECK: E x = E2d; 26// CHECK: } 27 28