[PATCH] D19975: [scan-build] fix warning emitted on LLVM Bitcode code base

Apelete Seketeli via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 15:16:21 PDT 2016


apelete added inline comments.

================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2512
@@ -2513,1 +2511,3 @@
+  unsigned FnEntry7BitAbbrev = VST_ENTRY_7_ABBREV;
+  unsigned FnEntry6BitAbbrev = VST_ENTRY_6_ABBREV;
   if (IsModuleLevel && hasVSTOffsetPlaceholder()) {
----------------
tejohnson wrote:
> These are not correct abbrev ids for this code.
These were needed to suppress a warning in case branch at line 2513 evaluates to 'false'.
>From the analyzer point of view, assigned value at line 2585 would then be garbage or undefined (commit message was mistaken in the wording of the warning, will fix).

I was not sure about which abbrev ids to assign variables FnEntry8BitAbbrev, FnEntry7BitAbbrev and FnEntry6BitAbbrev.
Will fix by assigning 0 and assert their value before use if that's OK for you.


http://reviews.llvm.org/D19975





More information about the llvm-commits mailing list