1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s 2 3 bool PR14634(int x) { 4 double y = (double)x; 5 return !y; 6 } 7 8 bool PR14634_implicit(int x) { 9 double y = (double)x; 10 return y; 11 } 12 13 void intAsBoolAsSwitchCondition(int c) { 14 switch ((bool)c) { // expected-warning {{switch condition has boolean value}} 15 case 0: 16 break; 17 } 18 19 switch ((int)(bool)c) { // no-warning 20 case 0: 21 break; 22 } 23 } 24