Author: Adam Balogh Date: 2020-07-01T09:04:26+02:00 New Revision: ff2d09148c91784c35b43c52f14b1501f38dd4c5
URL: https://github.com/llvm/llvm-project/commit/ff2d09148c91784c35b43c52f14b1501f38dd4c5 DIFF: https://github.com/llvm/llvm-project/commit/ff2d09148c91784c35b43c52f14b1501f38dd4c5.diff LOG: [LLDB][Clang Integration][NFC] Remove redundant condition 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. Differential Revision: https://reviews.llvm.org/D82559 Added: Modified: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index fe36d49428a5..bc9004815d2a 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -1729,10 +1729,8 @@ TypeSystemClang::GetNumBaseClasses(const CXXRecordDecl *cxx_record_decl, 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 lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits