// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s
// expected-no-diagnostics

bool PR14634(int x) {
  double y = (double)x;
  return !y;
}

bool PR14634_implicit(int x) {
  double y = (double)x;
  return y;
}

void intAsBoolAsSwitchCondition(int c) {
  switch ((bool)c) {
  case 0:
    break;
  }
}

// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s

bool PR14634(int x) {
  double y = (double)x;
  return !y;
}

bool PR14634_implicit(int x) {
  double y = (double)x;
  return y;
}

void intAsBoolAsSwitchCondition(int c) {
  switch ((bool)c) { // expected-warning {{switch condition has boolean value}}
  case 0:
    break;
  }

  switch ((int)(bool)c) { // no-warning
    case 0:
      break;
  }
}

Fix test in previous commit to account for compiler warning.
[analyzer] Fix test in previous commit to account for compiler warning.

--analyze passes -w, but -cc1 -analyze doesn't. Oops!

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@197741 91177308-0d34-0410-b5e6-96231b3b80d8
