[PATCH] D19834: [scan-build] fix dead store warnings emitted on llvm-objdump code base
Apelete Seketeli via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 13:48:01 PDT 2016
apelete created this revision.
apelete added a reviewer: enderby.
apelete added a subscriber: llvm-commits.
This fixes dead store warnings of the type "dead assignment" reported
by Clang Static Analyzer on the following file:
- tools/llvm-objdump/MachODump.cpp.
Signed-off-by: Apelete Seketeli <apelete at seketeli.net>
http://reviews.llvm.org/D19834
Files:
tools/llvm-objdump/MachODump.cpp
Index: tools/llvm-objdump/MachODump.cpp
===================================================================
--- tools/llvm-objdump/MachODump.cpp
+++ tools/llvm-objdump/MachODump.cpp
@@ -4636,10 +4636,12 @@
outs() << " " << name;
outs() << "\n";
- name =
- get_symbol_32(offset + offsetof(struct class32_t, data), S, info, c.data);
outs() << " data " << format("0x%" PRIx32, c.data)
<< " (struct class_ro_t *)";
+ name =
+ get_symbol_32(offset + offsetof(struct class32_t, data), S, info, c.data);
+ if (name != nullptr)
+ outs() << " " << name;
// This is a Swift class if some of the low bits of the pointer are set.
if (c.data & 0x3)
@@ -8602,7 +8604,6 @@
if (NeedsComma)
outs() << ", ";
outs() << format("resolver=0x%08llX", Entry.other());
- NeedsComma = true;
}
outs() << "]";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19834.55891.patch
Type: text/x-patch
Size: 895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/370ba221/attachment.bin>
More information about the llvm-commits
mailing list