[X86] Move getGFNICtrlMask before CTLZ/CTTZ lowering. NFC.
[llvm-project.git] / clang / test / SemaCXX / uninit-variables-conditional.cpp
blob3e3af672b8fada6eb65b06716071a37064cbc502
1 // RUN: %clang_cc1 -Wconditional-uninitialized -fsyntax-only %s -verify
3 class Foo {
4 public:
5 Foo();
6 ~Foo();
7 operator bool();
8 };
10 int bar();
11 int baz();
12 int init(double *);
14 // This case flags a false positive under -Wconditional-uninitialized because
15 // the destructor in Foo fouls about the minor bit of path-sensitivity in
16 // -Wuninitialized.
17 double test() {
18 double x; // expected-note{{initialize the variable 'x' to silence this warning}}
19 if (bar() || baz() || Foo() || init(&x))
20 return 1.0;
22 return x; // expected-warning {{variable 'x' may be uninitialized when used here}}