The effect is that if a variable is uninitialized along a branch (but initialized along another), at merge points it is considered uninitialized. Previously we had the opposite behavior. The new behavior is more conservative, and more in line with gcc's behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48689
91177308-0d34-0410-b5e6-
96231b3b80d8
//===----------------------------------------------------------------------===//
namespace {
- typedef ExprDeclBitVector_Types::Union Merge;
+ typedef ExprDeclBitVector_Types::Intersect Merge;
typedef DataflowSolver<UninitializedValues,TransferFuncs,Merge> Solver;
}
int f4(int x) {
int y;
if (x) y = 1;
- return y; // no-warning
+ return y; // expected-warning {{use of uninitialized variable}}
}
int f5() {