1 // RUN: %clang_cc1 -fsyntax-only %s 2 3 template<typename T, int N> 4 struct X0 { f0X05 const char *f0(bool Cond) { 6 return Cond? "honk" : N; 7 } 8 f1X09 const char *f1(bool Cond) { 10 return Cond? N : "honk"; 11 } 12 f2X013 bool f2(const char *str) { 14 return str == N; 15 } 16 }; 17 18 // PR4996 f0()19template<unsigned I> int f0() { 20 return __builtin_choose_expr(I, 0, 1); 21 } 22 23 // PR5041 24 struct A { }; 25 f(T * t)26template <typename T> void f(T *t) 27 { 28 (void)static_cast<void*>(static_cast<A*>(t)); 29 } 30