[PATCH] D19975: [scan-build] fix warning emitted on LLVM Bitcode code baseFix a logic error warning of the type "called C++ object pointer isnull" emitted by Clang Static Analyzer on the following file:- lib/Bitcode/Writer/BitcodeWriter.cpp.

Apelete Seketeli via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 07:42:47 PDT 2016


apelete created this revision.
apelete added reviewers: joe.abbey, tejohnson.
apelete added a subscriber: llvm-commits.

Signed-off-by: Apelete Seketeli <apelete at seketeli.net>

http://reviews.llvm.org/D19975

Files:
  lib/Bitcode/Writer/BitcodeWriter.cpp

Index: lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- lib/Bitcode/Writer/BitcodeWriter.cpp
+++ lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2507,9 +2507,9 @@
 
   // For the module-level VST, add abbrev Ids for the VST_CODE_FNENTRY
   // records, which are not used in the per-function VSTs.
-  unsigned FnEntry8BitAbbrev;
-  unsigned FnEntry7BitAbbrev;
-  unsigned FnEntry6BitAbbrev;
+  unsigned FnEntry8BitAbbrev = VST_ENTRY_8_ABBREV;
+  unsigned FnEntry7BitAbbrev = VST_ENTRY_7_ABBREV;
+  unsigned FnEntry6BitAbbrev = VST_ENTRY_6_ABBREV;
   if (IsModuleLevel && hasVSTOffsetPlaceholder()) {
     // 8-bit fixed-width VST_CODE_FNENTRY function strings.
     BitCodeAbbrev *Abbv = new BitCodeAbbrev();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19975.56287.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160505/4ebf0aa0/attachment.bin>


More information about the llvm-commits mailing list