1*a61e212aSDaniel Jasper // RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=1 2*a61e212aSDaniel Jasper // RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=2 3ed1cb88cSRichard Smith 4ed1cb88cSRichard Smith struct A { int a; }; 5ed1cb88cSRichard Smith 6ed1cb88cSRichard Smith #if N == 1 7ed1cb88cSRichard Smith // ChooseExpr test(int (&)[sizeof (__builtin_choose_expr (true,1,1),T ())])8ed1cb88cSRichard Smithtemplate<class T> void test(int (&)[sizeof(__builtin_choose_expr(true, 1, 1), T())]) {} // expected-error {{cannot yet mangle}} 9ed1cb88cSRichard Smith template void test<int>(int (&)[sizeof(int)]); 10ed1cb88cSRichard Smith 11ed1cb88cSRichard Smith #elif N == 2 12ed1cb88cSRichard Smith // CompoundLiteralExpr test(int (&)[sizeof ((A){},T ())])13ed1cb88cSRichard Smithtemplate<class T> void test(int (&)[sizeof((A){}, T())]) {} // expected-error {{cannot yet mangle}} 14ed1cb88cSRichard Smith template void test<int>(int (&)[sizeof(A)]); 15ed1cb88cSRichard Smith 16ed1cb88cSRichard Smith // FIXME: There are several more cases we can't yet mangle. 17ed1cb88cSRichard Smith 18ed1cb88cSRichard Smith #else 19ed1cb88cSRichard Smith #error unknown N 20ed1cb88cSRichard Smith #endif 21