From 531515198e477eedd2416d65c913d54e3779387e Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 3 Mar 2020 10:30:20 -0800 Subject: [PATCH] [lldb][NFC] Remove some commented out code in TypeSystemClang Summary: I don't see why we want to keep that code around. Reviewers: #lldb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: davide Differential Revision: https://reviews.llvm.org/D75496 --- .../TypeSystem/Clang/TypeSystemClang.cpp | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index ffcab238d09d..3b8c058c903a 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -1412,9 +1412,6 @@ ClassTemplateDecl *TypeSystemClang::CreateClassTemplateDecl( class_template_decl->setAccess( ConvertAccessTypeToAccessSpecifier(access_type)); - // if (TagDecl *ctx_tag_decl = dyn_cast(decl_ctx)) - // CompleteTagDeclarationDefinition(GetTypeForDecl(ctx_tag_decl)); - decl_ctx->addDecl(class_template_decl); VerifyDecl(class_template_decl); @@ -2039,15 +2036,12 @@ TypeSystemClang::CreateEnumerationType(const char *name, DeclContext *decl_ctx, // like maybe filling in the SourceLocation with it... ASTContext &ast = getASTContext(); - // TODO: ask about these... - // const bool IsFixed = false; - EnumDecl *enum_decl = EnumDecl::Create( ast, decl_ctx, SourceLocation(), SourceLocation(), name && name[0] ? &ast.Idents.get(name) : nullptr, nullptr, is_scoped, // IsScoped is_scoped, // IsScopedUsingClassTag - false); // IsFixed + false); // TODO: IsFixed if (enum_decl) { if (decl_ctx) @@ -4774,7 +4768,6 @@ lldb::Format TypeSystemClang::GetFormat(lldb::opaque_compiler_type_t type) { case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) { - // default: assert(0 && "Unknown builtin type!"); case clang::BuiltinType::UnknownAny: case clang::BuiltinType::Void: case clang::BuiltinType::BoundMember: @@ -6186,11 +6179,6 @@ static uint32_t GetIndexForRecordBase(const clang::RecordDecl *record_decl, const clang::CXXRecordDecl *cxx_record_decl = llvm::dyn_cast(record_decl); - // const char *super_name = record_decl->getNameAsCString(); - // const char *base_name = - // base_spec->getType()->getAs()->getDecl()->getNameAsCString(); - // printf ("GetIndexForRecordChild (%s, %s)\n", super_name, base_name); - // if (cxx_record_decl) { clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end; for (base_class = cxx_record_decl->bases_begin(), @@ -6201,12 +6189,6 @@ static uint32_t GetIndexForRecordBase(const clang::RecordDecl *record_decl, continue; } - // printf ("GetIndexForRecordChild (%s, %s) base[%u] = %s\n", - // super_name, base_name, - // child_idx, - // base_class->getType()->getAs()->getDecl()->getNameAsCString()); - // - // if (base_class == base_spec) return child_idx; ++child_idx; @@ -6312,9 +6294,6 @@ size_t TypeSystemClang::GetIndexOfChildMemberWithName( if (cxx_record_decl) { const clang::RecordDecl *parent_record_decl = cxx_record_decl; - // printf ("parent = %s\n", parent_record_decl->getNameAsCString()); - - // const Decl *root_cdecl = cxx_record_decl->getCanonicalDecl(); // Didn't find things easily, lets let clang do its thang... clang::IdentifierInfo &ident_ref = getASTContext().Idents.get(name_sref); @@ -7596,7 +7575,6 @@ clang::ObjCMethodDecl *TypeSystemClang::AddMethodToObjCObjectType( size_t len = 0; const char *start; - // printf ("name = '%s'\n", name); unsigned num_selectors_with_args = 0; for (start = selector_start; start && *start != '\0' && *start != ']';