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