[Lldb-commits] [PATCH] D82559: [LLDB][Clang Integration][NFC] Remove redundant condition
Balogh, Ádám via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 25 08:34:19 PDT 2020
baloghadamsoftware created this revision.
baloghadamsoftware added a reviewer: jingham.
baloghadamsoftware added a project: LLDB.
Herald added subscribers: martong, gamesh411, Szelethus, dkrupp, rnkovacs.
Condition `omit_empty_base_classes` is checked both in an outer and in an inner `if` statement in `TypeSystemClang::GetNumBaseClasses()`. This patch removes the redundant inner check.
The issue was found using `clang-tidy` check under review `misc-redundant-condition`. See https://reviews.llvm.org/D81272.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82559
Files:
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1729,10 +1729,8 @@
base_class_end = cxx_record_decl->bases_end();
base_class != base_class_end; ++base_class) {
// Skip empty base classes
- if (omit_empty_base_classes) {
- if (BaseSpecifierIsEmpty(base_class))
- continue;
- }
+ if (BaseSpecifierIsEmpty(base_class))
+ continue;
++num_bases;
}
} else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82559.273366.patch
Type: text/x-patch
Size: 663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200625/1f29f353/attachment.bin>
More information about the lldb-commits
mailing list