1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 // Make sure diagnostics that we don't print based on runtime control
4 // flow are delayed correctly in cases where we can't immediately tell whether
5 // the context is unevaluated.
6 
7 namespace std {
8   class type_info;
9 }
10 
11 int& NP(int);
12 void test1() { (void)typeid(NP(1 << 32)); }
13 
14 class Poly { virtual ~Poly(); };
15 Poly& P(int);
16 void test2() { (void)typeid(P(1 << 32)); } // expected-warning {{shift count >= width of type}}
17 
18 void test3() { 1 ? (void)0 : (void)typeid(P(1 << 32)); }
19