uninitialized. The warning is terrible, has incorrect source locations, and has
a huge false positive rate such as *all* of these.
If anyone has a better solution, please let me know. Alternatively, I'll
happily add -Wno-uninitialized to the -Werror build mode. Maybe I can even do
it *only* when building with GCC instead of Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120281
91177308-0d34-0410-b5e6-
96231b3b80d8
return Op0;
// A & ~A = ~A & A = 0
- Value *A, *B;
+ Value *A = 0, *B = 0;
if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
(match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getNullValue(Op0->getType());
return Op1;
// A | ~A = ~A | A = -1
- Value *A, *B;
+ Value *A = 0, *B = 0;
if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
(match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getAllOnesValue(Op0->getType());
return Constant::getNullValue(Op0->getType());
// A ^ ~A = ~A ^ A = -1
- Value *A, *B;
+ Value *A = 0, *B = 0;
if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
(match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getAllOnesValue(Op0->getType());