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
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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits