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