Audited the expression parser to find uninitialized
pointers. Some of the spots are obviously initialized
later, but it's better just to NULL the pointers out
at initialization to make the code more robust when
exposed to later changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134670 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/IRDynamicChecks.cpp b/source/Expression/IRDynamicChecks.cpp
index 584de69..09f520c 100644
--- a/source/Expression/IRDynamicChecks.cpp
+++ b/source/Expression/IRDynamicChecks.cpp
@@ -314,7 +314,7 @@
if (!m_valid_pointer_check_func)
m_valid_pointer_check_func = BuildPointerValidatorFunc(m_checker_functions.m_valid_pointer_check->StartAddress());
- llvm::Value *dereferenced_ptr;
+ llvm::Value *dereferenced_ptr = NULL;
if (llvm::LoadInst *li = dyn_cast<llvm::LoadInst> (inst))
dereferenced_ptr = li->getPointerOperand();
@@ -382,7 +382,7 @@
if (!m_objc_object_check_func)
m_objc_object_check_func = BuildPointerValidatorFunc(m_checker_functions.m_objc_object_check->StartAddress());
- llvm::Value *target_object;
+ llvm::Value *target_object = NULL;
// id objc_msgSend(id theReceiver, SEL theSelector, ...)