[Lldb-commits] [PATCH] D67915: [LLDB] Fix logically dead code
Konrad Wilhelm Kleine via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 23 06:41:04 PDT 2019
kwk created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
kwk added a reviewer: jankratochvil.
kwk edited the summary of this revision.
jankratochvil added a comment.
Personally I would check GIT history for some reasons it was written this way.
The indicated dead code may have performed some action; that action will never occur.
In lldb_private::LoadedModuleInfoList::LoadedModuleInfo::operator ==(lldb_private::LoadedModuleInfoList::LoadedModuleInfo const &): Code can never be reached because of a logical contradiction (CWE-561)
Coverity Scan: https://scan3.coverity.com/reports.htm#v39507/p12195/fileInstanceId=27614986&defectInstanceId=8037484&mergedDefectId=221581
CID 221581
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67915
Files:
lldb/include/lldb/Core/LoadedModuleInfoList.h
Index: lldb/include/lldb/Core/LoadedModuleInfoList.h
===================================================================
--- lldb/include/lldb/Core/LoadedModuleInfoList.h
+++ lldb/include/lldb/Core/LoadedModuleInfoList.h
@@ -84,9 +84,6 @@
}
bool operator==(LoadedModuleInfo const &rhs) const {
- if (e_num != rhs.e_num)
- return false;
-
for (size_t i = 0; i < e_num; ++i) {
if (m_has[i] != rhs.m_has[i])
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67915.221318.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190923/2b3400ed/attachment-0001.bin>
More information about the lldb-commits
mailing list