[llvm] r298122 - [coverity] Fix uninit variable.
Vassil Vassilev via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 13:58:08 PDT 2017
Author: vvassilev
Date: Fri Mar 17 15:58:08 2017
New Revision: 298122
URL: http://llvm.org/viewvc/llvm-project?rev=298122&view=rev
Log:
[coverity] Fix uninit variable.
Patch by John Harvey!
Modified:
llvm/trunk/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp?rev=298122&r1=298121&r2=298122&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp Fri Mar 17 15:58:08 2017
@@ -757,7 +757,7 @@ bool EfficiencySanitizer::instrumentGetE
return false;
}
Type *SourceTy = GepInst->getSourceElementType();
- StructType *StructTy;
+ StructType *StructTy = nullptr;
ConstantInt *Idx;
// Check if GEP calculates address from a struct array.
if (isa<StructType>(SourceTy)) {
More information about the llvm-commits
mailing list