[Lldb-commits] [lldb] 5315151 - [lldb][NFC] Remove some commented out code in TypeSystemClang
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 3 10:51:15 PST 2020
Author: Raphael Isemann
Date: 2020-03-03T10:50:48-08:00
New Revision: 531515198e477eedd2416d65c913d54e3779387e
URL: https://github.com/llvm/llvm-project/commit/531515198e477eedd2416d65c913d54e3779387e
DIFF: https://github.com/llvm/llvm-project/commit/531515198e477eedd2416d65c913d54e3779387e.diff
LOG: [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
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 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<TagDecl>(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<clang::BuiltinType>(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<clang::CXXRecordDecl>(record_decl);
- // const char *super_name = record_decl->getNameAsCString();
- // const char *base_name =
- // base_spec->getType()->getAs<clang::RecordType>()->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<clang::RecordType>()->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 != ']';
More information about the lldb-commits
mailing list