Skip to content

Commit

Permalink
header-checker: Remove unused variable and dead code
Browse files Browse the repository at this point in the history
Bug: 74764811
Test: ./tests/test.py
Change-Id: I5b3e03d65283565866157502fb09a1191edc9ef8
  • Loading branch information
loganchien committed Apr 2, 2019
1 parent f10fcc5 commit 565d361
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions vndk/tools/header-checker/src/dumper/abi_wrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,6 @@ TypeAndCreationStatus ABIWrapper::SetTypeKind(
return TypeAndCreationStatus(nullptr, false);
}

std::string ABIWrapper::GetTagDeclQualifiedName(const clang::TagDecl *decl) {
if (decl->getTypedefNameForAnonDecl()) {
return decl->getTypedefNameForAnonDecl()->getQualifiedNameAsString();
}
return decl->getQualifiedNameAsString();
}

std::string ABIWrapper::QualTypeToString(const clang::QualType &sweet_qt) {
const clang::QualType salty_qt = sweet_qt.getCanonicalType();
// clang::TypeName::getFullyQualifiedName removes the part of the type related
Expand Down Expand Up @@ -636,7 +629,6 @@ bool RecordDeclWrapper::SetupCXXBases(
clang::CXXRecordDecl::base_class_const_iterator base_class =
cxx_record_decl->bases_begin();
while (base_class != cxx_record_decl->bases_end()) {
std::string name = QualTypeToString(base_class->getType());
bool is_virtual = base_class->isVirtual();
repr::AccessSpecifierIR access =
AccessClangToIR(base_class->getAccessSpecifier());
Expand Down Expand Up @@ -908,7 +900,6 @@ bool EnumDeclWrapper::SetupEnumFields(repr::EnumTypeIR *enump) {

bool EnumDeclWrapper::SetupEnum(repr::EnumTypeIR *enum_type,
const std::string &source_file) {
std::string enum_name = GetTagDeclQualifiedName(enum_decl_);
clang::QualType enum_qual_type =
enum_decl_->getTypeForDecl()->getCanonicalTypeInternal();
if (!CreateExtendedType(enum_qual_type, enum_type)) {
Expand Down
2 changes: 0 additions & 2 deletions vndk/tools/header-checker/src/dumper/abi_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ class ABIWrapper {

std::string QualTypeToString(const clang::QualType &sweet_qt);

std::string GetTagDeclQualifiedName(const clang::TagDecl *decl);

bool CreateBasicNamedAndTypedDecl(clang::QualType,
const std::string &source_file);

Expand Down

0 comments on commit 565d361

Please sign in to comment.