diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-23 17:05:06 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-23 17:05:06 +0000 |
commit | 584520e8e2c1f8cc04bc8dd4dc4ea6c390627317 (patch) | |
tree | 5c2b967c7213bcde969f62c285053572437b44fe /lib/Transforms | |
parent | 54104db434d400e07cc238c9ac47c5e34e01cb20 (diff) | |
download | external_llvm-584520e8e2c1f8cc04bc8dd4dc4ea6c390627317.zip external_llvm-584520e8e2c1f8cc04bc8dd4dc4ea6c390627317.tar.gz external_llvm-584520e8e2c1f8cc04bc8dd4dc4ea6c390627317.tar.bz2 |
Null initialize a few variables flagged by
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineShifts.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineShifts.cpp b/lib/Transforms/InstCombine/InstCombineShifts.cpp index fe791dd..988f29e 100644 --- a/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -76,7 +76,7 @@ static bool CanEvaluateShifted(Value *V, unsigned NumBits, bool isLeftShift, // if the needed bits are already zero in the input. This allows us to reuse // the value which means that we don't care if the shift has multiple uses. // TODO: Handle opposite shift by exact value. - ConstantInt *CI; + ConstantInt *CI = 0; if ((isLeftShift && match(I, m_LShr(m_Value(), m_ConstantInt(CI)))) || (!isLeftShift && match(I, m_Shl(m_Value(), m_ConstantInt(CI))))) { if (CI->getZExtValue() == NumBits) { |