// RUN: %clang_cc1 -fsyntax-only -Wconditional-uninitialized -fsyntax-only %s -verify

class Foo {
public:
  Foo();
  ~Foo();
  operator bool();
};

int bar();
int baz();
int init(double *);

// This case flags a false positive under -Wconditional-uninitialized because
// the destructor in Foo fouls about the minor bit of path-sensitivity in
// -Wuninitialized.
double test() {
  double x; // expected-note {{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}}
  if (bar() || baz() || Foo() || init(&x)) {
    return x; // expected-warning {{variable 'x' is possibly uninitialized when used here}}
  }
  return 1.0;
}

// RUN: %clang_cc1 -fsyntax-only -Wconditional-uninitialized -fsyntax-only %s -verify

class Foo {
public:
  Foo();
  ~Foo();
  operator bool();
};

int bar();
int baz();
int init(double *);

// This case flags a false positive under -Wconditional-uninitialized because
// the destructor in Foo fouls about the minor bit of path-sensitivity in
// -Wuninitialized.
double test() {
  double x; // expected-note {{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}}
  if (bar() || baz() || Foo() || init(&x))
    return 1.0;

  return x; // expected-warning {{variable 'x' is possibly uninitialized when used here}}
}

Fix test to test the right thing.
Fix test to test the right thing.

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