Merge "Remove -suppress-errors from header-abi-dumper"
This commit is contained in:
@@ -63,8 +63,6 @@ cc_binary_host {
|
||||
srcs: [
|
||||
"src/dumper/abi_wrappers.cpp",
|
||||
"src/dumper/ast_processing.cpp",
|
||||
"src/dumper/diagnostic_consumer.cpp",
|
||||
"src/dumper/fake_decl_source.cpp",
|
||||
"src/dumper/fixed_argv.cpp",
|
||||
"src/dumper/frontend_action.cpp",
|
||||
"src/dumper/frontend_action_factory.cpp",
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
// Copyright (C) 2018 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "dumper/diagnostic_consumer.h"
|
||||
|
||||
#include <clang/Basic/DiagnosticCategories.h>
|
||||
#include <clang/Basic/DiagnosticIDs.h>
|
||||
#include <clang/Lex/LexDiagnostic.h>
|
||||
|
||||
|
||||
namespace header_checker {
|
||||
namespace dumper {
|
||||
|
||||
|
||||
HeaderCheckerDiagnosticConsumer::HeaderCheckerDiagnosticConsumer(
|
||||
std::unique_ptr<clang::DiagnosticConsumer> wrapped)
|
||||
: wrapped_(std::move(wrapped)) {}
|
||||
|
||||
void HeaderCheckerDiagnosticConsumer::clear() {
|
||||
// Default implementation resets warning/error count.
|
||||
DiagnosticConsumer::clear();
|
||||
wrapped_->clear();
|
||||
}
|
||||
|
||||
void HeaderCheckerDiagnosticConsumer::BeginSourceFile(
|
||||
const clang::LangOptions &lang_opts,
|
||||
const clang::Preprocessor *preprocessor) {
|
||||
wrapped_->BeginSourceFile(lang_opts, preprocessor);
|
||||
}
|
||||
|
||||
void HeaderCheckerDiagnosticConsumer::EndSourceFile() {
|
||||
wrapped_->EndSourceFile();
|
||||
}
|
||||
|
||||
void HeaderCheckerDiagnosticConsumer::finish() { wrapped_->finish(); }
|
||||
|
||||
bool HeaderCheckerDiagnosticConsumer::IncludeInDiagnosticCounts() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void HeaderCheckerDiagnosticConsumer::HandleDiagnostic(
|
||||
clang::DiagnosticsEngine::Level level, const clang::Diagnostic &info) {
|
||||
if (level < clang::DiagnosticsEngine::Level::Error) {
|
||||
return;
|
||||
}
|
||||
unsigned id = info.getID();
|
||||
if (id == clang::diag::err_pp_hash_error ||
|
||||
id == clang::diag::fatal_too_many_errors) {
|
||||
return;
|
||||
}
|
||||
unsigned category = clang::DiagnosticIDs::getCategoryNumberForDiag(id);
|
||||
if (category == clang::diag::DiagCat_Semantic_Issue) {
|
||||
return;
|
||||
}
|
||||
// Default implementation increases warning/error count.
|
||||
DiagnosticConsumer::HandleDiagnostic(level, info);
|
||||
wrapped_->HandleDiagnostic(level, info);
|
||||
}
|
||||
|
||||
|
||||
} // dumper
|
||||
} // header_checker
|
||||
@@ -1,47 +0,0 @@
|
||||
// Copyright (C) 2018 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef DIAGNOSTIC_CONSUMER_H_
|
||||
#define DIAGNOSTIC_CONSUMER_H_
|
||||
|
||||
#include <clang/Basic/Diagnostic.h>
|
||||
|
||||
|
||||
namespace header_checker {
|
||||
namespace dumper {
|
||||
|
||||
|
||||
class HeaderCheckerDiagnosticConsumer : public clang::DiagnosticConsumer {
|
||||
private:
|
||||
std::unique_ptr<clang::DiagnosticConsumer> wrapped_;
|
||||
|
||||
public:
|
||||
HeaderCheckerDiagnosticConsumer(
|
||||
std::unique_ptr<clang::DiagnosticConsumer> wrapped);
|
||||
void clear() override;
|
||||
void BeginSourceFile(const clang::LangOptions &lang_opts,
|
||||
const clang::Preprocessor *preprocessor) override;
|
||||
void EndSourceFile() override;
|
||||
void finish() override;
|
||||
bool IncludeInDiagnosticCounts() const override;
|
||||
void HandleDiagnostic(clang::DiagnosticsEngine::Level level,
|
||||
const clang::Diagnostic &info) override;
|
||||
};
|
||||
|
||||
|
||||
} // namespace dumper
|
||||
} // namespace header_checker
|
||||
|
||||
|
||||
#endif // DIAGNOSTIC_CONSUMER_H_
|
||||
@@ -1,208 +0,0 @@
|
||||
// Copyright (C) 2018 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "dumper/fake_decl_source.h"
|
||||
|
||||
#include <clang/Lex/Preprocessor.h>
|
||||
#include <clang/Sema/Lookup.h>
|
||||
|
||||
|
||||
namespace header_checker {
|
||||
namespace dumper {
|
||||
|
||||
|
||||
FakeDeclSource::FakeDeclSource(const clang::CompilerInstance &ci) : ci_(ci) {}
|
||||
|
||||
clang::CXXRecordDecl *
|
||||
FakeDeclSource::CreateCXXRecordDecl(const clang::DeclarationName &name,
|
||||
clang::DeclContext *decl_context) {
|
||||
clang::CXXRecordDecl *cxx_record_decl = clang::CXXRecordDecl::Create(
|
||||
ci_.getASTContext(), clang::TTK_Struct, decl_context,
|
||||
clang::SourceLocation(), clang::SourceLocation(),
|
||||
name.getAsIdentifierInfo(), /* PrevDecl */ nullptr);
|
||||
cxx_record_decl->setInvalidDecl(true);
|
||||
|
||||
return cxx_record_decl;
|
||||
}
|
||||
|
||||
clang::ClassTemplateDecl *
|
||||
FakeDeclSource::CreateClassTemplateDecl(clang::CXXRecordDecl *cxx_record_decl,
|
||||
clang::DeclContext *decl_context) {
|
||||
clang::ASTContext &ast = ci_.getASTContext();
|
||||
|
||||
// Declare `template<typename ...T> struct RecordName` in decl_context.
|
||||
clang::TemplateTypeParmDecl *parm = clang::TemplateTypeParmDecl::Create(
|
||||
ast, decl_context, clang::SourceLocation(), clang::SourceLocation(),
|
||||
/* Depth */ 0, /* Position */ 0, /* Id */ nullptr,
|
||||
/* Typename */ true, /* ParameterPack */ true);
|
||||
parm->setInvalidDecl(true);
|
||||
|
||||
clang::NamedDecl *parm_array[1] = {parm};
|
||||
clang::TemplateParameterList *parm_list =
|
||||
clang::TemplateParameterList::Create(
|
||||
ast, clang::SourceLocation(), clang::SourceLocation(), parm_array,
|
||||
clang::SourceLocation(), /* RequiresClause */ nullptr);
|
||||
|
||||
clang::ClassTemplateDecl *class_template_decl =
|
||||
clang::ClassTemplateDecl::Create(
|
||||
ast, decl_context, clang::SourceLocation(),
|
||||
cxx_record_decl->getDeclName(), parm_list, cxx_record_decl);
|
||||
|
||||
cxx_record_decl->setDescribedClassTemplate(class_template_decl);
|
||||
class_template_decl->setInvalidDecl(true);
|
||||
|
||||
return class_template_decl;
|
||||
}
|
||||
|
||||
clang::NamespaceDecl *
|
||||
FakeDeclSource::CreateNamespaceDecl(const clang::DeclarationName &name,
|
||||
clang::DeclContext *decl_context) {
|
||||
clang::NamespaceDecl *namespace_decl = clang::NamespaceDecl::Create(
|
||||
ci_.getASTContext(), decl_context, /* Inline */ false,
|
||||
clang::SourceLocation(), clang::SourceLocation(),
|
||||
name.getAsIdentifierInfo(), /* PrevDecl */ nullptr);
|
||||
namespace_decl->setInvalidDecl(true);
|
||||
|
||||
return namespace_decl;
|
||||
}
|
||||
|
||||
clang::NamedDecl *
|
||||
FakeDeclSource::CreateDecl(clang::Sema::LookupNameKind kind,
|
||||
const clang::DeclarationNameInfo &name_info,
|
||||
clang::DeclContext *decl_context) {
|
||||
const clang::DeclarationName &name = name_info.getName();
|
||||
if (name.getNameKind() != clang::DeclarationName::Identifier) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
clang::NamedDecl *decl;
|
||||
switch (kind) {
|
||||
case clang::Sema::LookupOrdinaryName:
|
||||
case clang::Sema::LookupTagName: {
|
||||
clang::CXXRecordDecl *cxx_record_decl =
|
||||
CreateCXXRecordDecl(name, decl_context);
|
||||
// If `<` follows the type name, the type must be a template.
|
||||
// Otherwise, the compiler takes it as a syntax error.
|
||||
const clang::Token &next_token = ci_.getPreprocessor().LookAhead(0);
|
||||
if (next_token.is(clang::tok::less)) {
|
||||
decl = CreateClassTemplateDecl(cxx_record_decl, decl_context);
|
||||
} else {
|
||||
decl = cxx_record_decl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case clang::Sema::LookupNestedNameSpecifierName:
|
||||
decl = CreateNamespaceDecl(name, decl_context);
|
||||
break;
|
||||
default:
|
||||
decl = nullptr;
|
||||
}
|
||||
|
||||
if (decl) {
|
||||
decl_context->addDecl(decl);
|
||||
}
|
||||
return decl;
|
||||
}
|
||||
|
||||
clang::DeclContext *
|
||||
FakeDeclSource::ResolveDeclContext(clang::DeclContext *member_context,
|
||||
clang::Scope *scope,
|
||||
clang::NestedNameSpecifier *nns) {
|
||||
if (member_context) {
|
||||
return member_context;
|
||||
}
|
||||
|
||||
if (nns) {
|
||||
switch (nns->getKind()) {
|
||||
case clang::NestedNameSpecifier::Namespace:
|
||||
return nns->getAsNamespace();
|
||||
case clang::NestedNameSpecifier::NamespaceAlias:
|
||||
return nns->getAsNamespaceAlias()->getNamespace();
|
||||
case clang::NestedNameSpecifier::TypeSpec:
|
||||
case clang::NestedNameSpecifier::TypeSpecWithTemplate:
|
||||
return nns->getAsRecordDecl();
|
||||
case clang::NestedNameSpecifier::Global:
|
||||
return ci_.getASTContext().getTranslationUnitDecl();
|
||||
case clang::NestedNameSpecifier::Identifier:
|
||||
case clang::NestedNameSpecifier::Super:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (scope && scope->getEntity()) {
|
||||
return scope->getEntity();
|
||||
}
|
||||
|
||||
return ci_.getASTContext().getTranslationUnitDecl();
|
||||
}
|
||||
|
||||
clang::TypoCorrection FakeDeclSource::CorrectTypo(
|
||||
const clang::DeclarationNameInfo &typo, int lookup_kind,
|
||||
clang::Scope *scope, clang::CXXScopeSpec *scope_spec,
|
||||
clang::CorrectionCandidateCallback &ccc, clang::DeclContext *member_context,
|
||||
bool entering_context, const clang::ObjCObjectPointerType *opt) {
|
||||
// Skip function bodies.
|
||||
if (scope && scope->getFnParent()) {
|
||||
return clang::TypoCorrection();
|
||||
}
|
||||
|
||||
clang::NestedNameSpecifier *nns = nullptr;
|
||||
if (scope_spec && !scope_spec->isEmpty()) {
|
||||
nns = scope_spec->getScopeRep();
|
||||
}
|
||||
|
||||
clang::DeclContext *decl_context =
|
||||
ResolveDeclContext(member_context, scope, nns);
|
||||
|
||||
clang::NamedDecl *decl =
|
||||
CreateDecl(clang::Sema::LookupNameKind(lookup_kind), typo, decl_context);
|
||||
if (decl == nullptr) {
|
||||
return clang::TypoCorrection();
|
||||
}
|
||||
|
||||
return clang::TypoCorrection(decl, nns);
|
||||
}
|
||||
|
||||
bool FakeDeclSource::LookupUnqualified(clang::LookupResult &result,
|
||||
clang::Scope *scope) {
|
||||
// The compiler looks for redeclaration when it parses a known name.
|
||||
if (result.isForRedeclaration()) {
|
||||
return false;
|
||||
}
|
||||
// Skip function bodies.
|
||||
if (scope && scope->getFnParent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
clang::DeclContext *decl_context;
|
||||
if (scope && scope->getEntity()) {
|
||||
decl_context = scope->getEntity();
|
||||
} else {
|
||||
decl_context = ci_.getASTContext().getTranslationUnitDecl();
|
||||
}
|
||||
|
||||
clang::NamedDecl *decl = CreateDecl(result.getLookupKind(),
|
||||
result.getLookupNameInfo(), decl_context);
|
||||
if (decl == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
result.addDecl(decl);
|
||||
result.resolveKind();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // dumper
|
||||
} // header_checker
|
||||
@@ -1,74 +0,0 @@
|
||||
// Copyright (C) 2018 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef HEADER_CHECKER_ABI_DUMPER_FAKE_DECL_SOURCE_H_
|
||||
#define HEADER_CHECKER_ABI_DUMPER_FAKE_DECL_SOURCE_H_
|
||||
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
#include <clang/Sema/ExternalSemaSource.h>
|
||||
#include <clang/Sema/Sema.h>
|
||||
|
||||
|
||||
namespace header_checker {
|
||||
namespace dumper {
|
||||
|
||||
|
||||
// This class creates fake declarations when the compiler queries for unknown
|
||||
// types.
|
||||
class FakeDeclSource : public clang::ExternalSemaSource {
|
||||
private:
|
||||
const clang::CompilerInstance &ci_;
|
||||
|
||||
clang::CXXRecordDecl *CreateCXXRecordDecl(const clang::DeclarationName &name,
|
||||
clang::DeclContext *decl_context);
|
||||
|
||||
clang::ClassTemplateDecl *
|
||||
CreateClassTemplateDecl(clang::CXXRecordDecl *cxx_record_decl,
|
||||
clang::DeclContext *decl_context);
|
||||
|
||||
clang::NamespaceDecl *CreateNamespaceDecl(const clang::DeclarationName &name,
|
||||
clang::DeclContext *decl_context);
|
||||
|
||||
// This method creates a declaration in decl_context according to the lookup
|
||||
// name kind and the declaration name kind. If this method doesn't support the
|
||||
// kinds, it returns nullptr.
|
||||
clang::NamedDecl *CreateDecl(clang::Sema::LookupNameKind kind,
|
||||
const clang::DeclarationNameInfo &name,
|
||||
clang::DeclContext *decl_context);
|
||||
|
||||
// Return the DeclContext for CorrectTypo to create a declaration in.
|
||||
clang::DeclContext *ResolveDeclContext(clang::DeclContext *member_context,
|
||||
clang::Scope *scope,
|
||||
clang::NestedNameSpecifier *nns);
|
||||
|
||||
public:
|
||||
FakeDeclSource(const clang::CompilerInstance &ci);
|
||||
|
||||
clang::TypoCorrection
|
||||
CorrectTypo(const clang::DeclarationNameInfo &typo, int lookup_kind,
|
||||
clang::Scope *scope, clang::CXXScopeSpec *scope_spec,
|
||||
clang::CorrectionCandidateCallback &ccc,
|
||||
clang::DeclContext *member_context, bool entering_context,
|
||||
const clang::ObjCObjectPointerType *opt) override;
|
||||
|
||||
bool LookupUnqualified(clang::LookupResult &result,
|
||||
clang::Scope *scope) override;
|
||||
};
|
||||
|
||||
|
||||
} // namespace dumper
|
||||
} // namespace header_checker
|
||||
|
||||
|
||||
#endif // HEADER_CHECKER_ABI_DUMPER_FAKE_DECL_SOURCE_H_
|
||||
@@ -15,14 +15,11 @@
|
||||
#include "dumper/frontend_action.h"
|
||||
|
||||
#include "dumper/ast_processing.h"
|
||||
#include "dumper/diagnostic_consumer.h"
|
||||
#include "dumper/fake_decl_source.h"
|
||||
#include "repr/ir_representation.h"
|
||||
#include "utils/header_abi_util.h"
|
||||
|
||||
#include <clang/AST/ASTConsumer.h>
|
||||
// FIXME: ASTFrontendAction depends on DenseMapInfo<clang::QualType>.
|
||||
#include <clang/AST/TypeOrdering.h>
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
#include <clang/Lex/Preprocessor.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
@@ -42,26 +39,6 @@ HeaderCheckerFrontendAction::CreateASTConsumer(clang::CompilerInstance &ci,
|
||||
return std::make_unique<HeaderASTConsumer>(&ci, options_);
|
||||
}
|
||||
|
||||
bool HeaderCheckerFrontendAction::BeginInvocation(clang::CompilerInstance &ci) {
|
||||
if (options_.suppress_errors_) {
|
||||
ci.getFrontendOpts().SkipFunctionBodies = true;
|
||||
clang::DiagnosticsEngine &diagnostics = ci.getDiagnostics();
|
||||
diagnostics.setClient(
|
||||
new HeaderCheckerDiagnosticConsumer(diagnostics.takeClient()),
|
||||
/* ShouldOwnClient */ true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HeaderCheckerFrontendAction::BeginSourceFileAction(
|
||||
clang::CompilerInstance &ci) {
|
||||
if (options_.suppress_errors_) {
|
||||
ci.setExternalSemaSource(new FakeDeclSource(ci));
|
||||
ci.getPreprocessor().SetSuppressIncludeNotFoundError(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // dumper
|
||||
} // header_checker
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
#include <clang/Frontend/FrontendAction.h>
|
||||
#include <llvm/ADT/StringRef.h>
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace clang {
|
||||
class ASTConsumer;
|
||||
@@ -46,9 +41,6 @@ class HeaderCheckerFrontendAction : public clang::ASTFrontendAction {
|
||||
protected:
|
||||
std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
|
||||
clang::CompilerInstance &ci, llvm::StringRef header_file) override;
|
||||
|
||||
bool BeginInvocation(clang::CompilerInstance &ci) override;
|
||||
bool BeginSourceFileAction(clang::CompilerInstance &ci) override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -77,11 +77,6 @@ static llvm::cl::opt<bool> no_filter(
|
||||
"no-filter", llvm::cl::desc("Do not filter any abi"), llvm::cl::Optional,
|
||||
llvm::cl::cat(header_checker_category));
|
||||
|
||||
static llvm::cl::opt<bool> suppress_errors(
|
||||
"suppress-errors",
|
||||
llvm::cl::desc("Suppress preprocess and semantic errors"),
|
||||
llvm::cl::Optional, llvm::cl::cat(header_checker_category));
|
||||
|
||||
static llvm::cl::opt<bool> dump_function_declarations(
|
||||
"dump-function-declarations",
|
||||
llvm::cl::desc("Output the functions declared but not defined in the input "
|
||||
@@ -184,10 +179,10 @@ int main(int argc, const char **argv) {
|
||||
|
||||
// Initialize clang tools and run front-end action.
|
||||
std::vector<std::string> header_files{ header_file };
|
||||
HeaderCheckerOptions options(
|
||||
NormalizePath(header_file, parsed_root_dirs), out_dump,
|
||||
std::move(exported_headers), std::move(parsed_root_dirs), output_format,
|
||||
dump_exported_only, dump_function_declarations, suppress_errors);
|
||||
HeaderCheckerOptions options(NormalizePath(header_file, parsed_root_dirs),
|
||||
out_dump, std::move(exported_headers),
|
||||
std::move(parsed_root_dirs), output_format,
|
||||
dump_exported_only, dump_function_declarations);
|
||||
|
||||
clang::tooling::ClangTool tool(*compilations, header_files);
|
||||
std::unique_ptr<clang::tooling::FrontendActionFactory> factory(
|
||||
|
||||
@@ -35,20 +35,20 @@ class HeaderCheckerOptions {
|
||||
repr::TextFormatIR text_format_;
|
||||
const bool dump_exported_only_;
|
||||
bool dump_function_declarations_;
|
||||
bool suppress_errors_;
|
||||
|
||||
public:
|
||||
HeaderCheckerOptions(std::string source_file, std::string dump_name,
|
||||
std::set<std::string> exported_headers,
|
||||
utils::RootDirs root_dirs,
|
||||
repr::TextFormatIR text_format, bool dump_exported_only,
|
||||
bool dump_function_declarations, bool suppress_errors)
|
||||
: source_file_(std::move(source_file)), dump_name_(std::move(dump_name)),
|
||||
bool dump_function_declarations)
|
||||
: source_file_(std::move(source_file)),
|
||||
dump_name_(std::move(dump_name)),
|
||||
exported_headers_(std::move(exported_headers)),
|
||||
root_dirs_(std::move(root_dirs)), text_format_(text_format),
|
||||
root_dirs_(std::move(root_dirs)),
|
||||
text_format_(text_format),
|
||||
dump_exported_only_(dump_exported_only),
|
||||
dump_function_declarations_(dump_function_declarations),
|
||||
suppress_errors_(suppress_errors) {}
|
||||
dump_function_declarations_(dump_function_declarations) {}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef KNOWN_ISSUES_H_
|
||||
#define KNOWN_ISSUES_H_
|
||||
|
||||
// header-abi-dumper is unable to output the following types correctly.
|
||||
|
||||
// template<int I> struct NonTypeTemplate;
|
||||
extern NonTypeTemplate<1> non_type_template;
|
||||
|
||||
// namespace namespace1{
|
||||
// template<typename T> class UsingTemplate;
|
||||
// }
|
||||
using namespace1::UsingTemplate;
|
||||
extern UsingTemplate<float> *using_template;
|
||||
|
||||
// #define STDCALL __stdcall
|
||||
STDCALL return_type function_with_calling_convention();
|
||||
|
||||
// class ClassInNameSpace;
|
||||
template <typename T> class ClassTemplate;
|
||||
extern ClassTemplate<::ClassInNameSpace> template_arg_in_namespace;
|
||||
|
||||
#endif // KNOWN_ISSUES_H_
|
||||
@@ -1,27 +0,0 @@
|
||||
#ifndef UNDECLARED_TYPES_H_
|
||||
#define UNDECLARED_TYPES_H_
|
||||
|
||||
using ::namespace_a::A;
|
||||
typedef const namespace_b::B *B;
|
||||
using C = namespace_c::C[];
|
||||
|
||||
extern A a;
|
||||
extern namespace_b::template_b<B> b;
|
||||
extern const decltype(b) c;
|
||||
|
||||
inline A &inline_function(template_c<template_d<C>> d) {
|
||||
LocalVar e;
|
||||
return FunctionCall(d, e);
|
||||
}
|
||||
|
||||
class InvalidClass {
|
||||
A member;
|
||||
|
||||
D member_function(E);
|
||||
virtual void virtual_function(float);
|
||||
};
|
||||
|
||||
#define DECLARE_VARIABLE extern TemplateInMacro<F> *template_in_macro
|
||||
DECLARE_VARIABLE;
|
||||
|
||||
#endif // UNDECLARED_TYPES_H_
|
||||
@@ -145,16 +145,6 @@ class LsdumpModule(Module):
|
||||
|
||||
|
||||
TEST_MODULES = [
|
||||
SdumpModule(
|
||||
name='undeclared_types.h',
|
||||
src='integration/cpp/header/undeclared_types.h',
|
||||
arch='',
|
||||
dumper_flags=['-suppress-errors', '-output-format', 'Json']),
|
||||
SdumpModule(
|
||||
name='known_issues.h',
|
||||
src='integration/cpp/header/known_issues.h',
|
||||
arch='',
|
||||
dumper_flags=['-suppress-errors', '-output-format', 'Json']),
|
||||
LsdumpModule(
|
||||
name='libc_and_cpp',
|
||||
srcs=[
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 4,
|
||||
"is_integral" : true,
|
||||
"linker_set_key" : "_ZTIi",
|
||||
"name" : "int",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"self_type" : "_ZTIi",
|
||||
"size" : 4
|
||||
}
|
||||
],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" : [],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "non_type_template",
|
||||
"name" : "non_type_template",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "return_type",
|
||||
"name" : "return_type",
|
||||
"referenced_type" : "_ZTI7STDCALL",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_arg_in_namespace",
|
||||
"name" : "template_arg_in_namespace",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" : [],
|
||||
"pointer_types" : [],
|
||||
"qualified_types" : [],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" : [],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" :
|
||||
[
|
||||
{
|
||||
"function_name" : "inline_function",
|
||||
"linker_set_key" : "_Z15inline_function10template_cIJ10template_dIJA_N11namespace_c1CEEEEE",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"referenced_type" : "_ZTI10template_cIJ10template_dIJA_N11namespace_c1CEEEEE"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIRN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"access" : "private",
|
||||
"function_name" : "InvalidClass::member_function",
|
||||
"linker_set_key" : "_ZN12InvalidClass15member_functionE1E",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"is_this_ptr" : true,
|
||||
"referenced_type" : "_ZTIP12InvalidClass"
|
||||
},
|
||||
{
|
||||
"referenced_type" : "_ZTI1E"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIN12InvalidClass1DE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "a",
|
||||
"name" : "a",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "b",
|
||||
"name" : "b",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "c",
|
||||
"name" : "c",
|
||||
"referenced_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_in_macro",
|
||||
"name" : "template_in_macro",
|
||||
"referenced_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIRN11namespace_a1AE",
|
||||
"name" : "namespace_a::A &",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"self_type" : "_ZTIRN11namespace_a1AE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"pointer_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP12InvalidClass",
|
||||
"name" : "InvalidClass *",
|
||||
"referenced_type" : "_ZTI12InvalidClass",
|
||||
"self_type" : "_ZTIP12InvalidClass",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"name" : "TemplateInMacro<F> *",
|
||||
"referenced_type" : "_ZTI15TemplateInMacroIJ1FEE",
|
||||
"self_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"qualified_types" :
|
||||
[
|
||||
{
|
||||
"is_const" : true,
|
||||
"linker_set_key" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"name" : "const namespace_b::template_b<const B *>",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"self_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 4,
|
||||
"is_integral" : true,
|
||||
"linker_set_key" : "_ZTIi",
|
||||
"name" : "int",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"self_type" : "_ZTIi",
|
||||
"size" : 4
|
||||
}
|
||||
],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" : [],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "non_type_template",
|
||||
"name" : "non_type_template",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "return_type",
|
||||
"name" : "return_type",
|
||||
"referenced_type" : "_ZTI7STDCALL",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_arg_in_namespace",
|
||||
"name" : "template_arg_in_namespace",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" : [],
|
||||
"pointer_types" : [],
|
||||
"qualified_types" : [],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" : [],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" :
|
||||
[
|
||||
{
|
||||
"function_name" : "inline_function",
|
||||
"linker_set_key" : "_Z15inline_function10template_cIJ10template_dIJA_N11namespace_c1CEEEEE",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"referenced_type" : "_ZTI10template_cIJ10template_dIJA_N11namespace_c1CEEEEE"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIRN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"access" : "private",
|
||||
"function_name" : "InvalidClass::member_function",
|
||||
"linker_set_key" : "_ZN12InvalidClass15member_functionE1E",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"is_this_ptr" : true,
|
||||
"referenced_type" : "_ZTIP12InvalidClass"
|
||||
},
|
||||
{
|
||||
"referenced_type" : "_ZTI1E"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIN12InvalidClass1DE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "a",
|
||||
"name" : "a",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "b",
|
||||
"name" : "b",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "c",
|
||||
"name" : "c",
|
||||
"referenced_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_in_macro",
|
||||
"name" : "template_in_macro",
|
||||
"referenced_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIRN11namespace_a1AE",
|
||||
"name" : "namespace_a::A &",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"self_type" : "_ZTIRN11namespace_a1AE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"pointer_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP12InvalidClass",
|
||||
"name" : "InvalidClass *",
|
||||
"referenced_type" : "_ZTI12InvalidClass",
|
||||
"self_type" : "_ZTIP12InvalidClass",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"name" : "TemplateInMacro<F> *",
|
||||
"referenced_type" : "_ZTI15TemplateInMacroIJ1FEE",
|
||||
"self_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"qualified_types" :
|
||||
[
|
||||
{
|
||||
"is_const" : true,
|
||||
"linker_set_key" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"name" : "const namespace_b::template_b<const B *>",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"self_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 4,
|
||||
"is_integral" : true,
|
||||
"linker_set_key" : "_ZTIi",
|
||||
"name" : "int",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"self_type" : "_ZTIi",
|
||||
"size" : 4
|
||||
}
|
||||
],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" : [],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "non_type_template",
|
||||
"name" : "non_type_template",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "return_type",
|
||||
"name" : "return_type",
|
||||
"referenced_type" : "_ZTI7STDCALL",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_arg_in_namespace",
|
||||
"name" : "template_arg_in_namespace",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" : [],
|
||||
"pointer_types" : [],
|
||||
"qualified_types" : [],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" : [],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" :
|
||||
[
|
||||
{
|
||||
"function_name" : "inline_function",
|
||||
"linker_set_key" : "_Z15inline_function10template_cIJ10template_dIJA_N11namespace_c1CEEEEE",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"referenced_type" : "_ZTI10template_cIJ10template_dIJA_N11namespace_c1CEEEEE"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIRN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"access" : "private",
|
||||
"function_name" : "InvalidClass::member_function",
|
||||
"linker_set_key" : "_ZN12InvalidClass15member_functionE1E",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"is_this_ptr" : true,
|
||||
"referenced_type" : "_ZTIP12InvalidClass"
|
||||
},
|
||||
{
|
||||
"referenced_type" : "_ZTI1E"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIN12InvalidClass1DE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "a",
|
||||
"name" : "a",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "b",
|
||||
"name" : "b",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "c",
|
||||
"name" : "c",
|
||||
"referenced_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_in_macro",
|
||||
"name" : "template_in_macro",
|
||||
"referenced_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIRN11namespace_a1AE",
|
||||
"name" : "namespace_a::A &",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"self_type" : "_ZTIRN11namespace_a1AE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"pointer_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP12InvalidClass",
|
||||
"name" : "InvalidClass *",
|
||||
"referenced_type" : "_ZTI12InvalidClass",
|
||||
"self_type" : "_ZTIP12InvalidClass",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"name" : "TemplateInMacro<F> *",
|
||||
"referenced_type" : "_ZTI15TemplateInMacroIJ1FEE",
|
||||
"self_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"qualified_types" :
|
||||
[
|
||||
{
|
||||
"is_const" : true,
|
||||
"linker_set_key" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"name" : "const namespace_b::template_b<const B *>",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"self_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 4,
|
||||
"is_integral" : true,
|
||||
"linker_set_key" : "_ZTIi",
|
||||
"name" : "int",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"self_type" : "_ZTIi",
|
||||
"size" : 4
|
||||
}
|
||||
],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" : [],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "non_type_template",
|
||||
"name" : "non_type_template",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "return_type",
|
||||
"name" : "return_type",
|
||||
"referenced_type" : "_ZTI7STDCALL",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_arg_in_namespace",
|
||||
"name" : "template_arg_in_namespace",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" : [],
|
||||
"pointer_types" : [],
|
||||
"qualified_types" : [],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" : [],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" :
|
||||
[
|
||||
{
|
||||
"function_name" : "inline_function",
|
||||
"linker_set_key" : "_Z15inline_function10template_cIJ10template_dIJA_N11namespace_c1CEEEEE",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"referenced_type" : "_ZTI10template_cIJ10template_dIJA_N11namespace_c1CEEEEE"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIRN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"access" : "private",
|
||||
"function_name" : "InvalidClass::member_function",
|
||||
"linker_set_key" : "_ZN12InvalidClass15member_functionE1E",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"is_this_ptr" : true,
|
||||
"referenced_type" : "_ZTIP12InvalidClass"
|
||||
},
|
||||
{
|
||||
"referenced_type" : "_ZTI1E"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIN12InvalidClass1DE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "a",
|
||||
"name" : "a",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "b",
|
||||
"name" : "b",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "c",
|
||||
"name" : "c",
|
||||
"referenced_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_in_macro",
|
||||
"name" : "template_in_macro",
|
||||
"referenced_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIRN11namespace_a1AE",
|
||||
"name" : "namespace_a::A &",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"self_type" : "_ZTIRN11namespace_a1AE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"pointer_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP12InvalidClass",
|
||||
"name" : "InvalidClass *",
|
||||
"referenced_type" : "_ZTI12InvalidClass",
|
||||
"self_type" : "_ZTIP12InvalidClass",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"name" : "TemplateInMacro<F> *",
|
||||
"referenced_type" : "_ZTI15TemplateInMacroIJ1FEE",
|
||||
"self_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"qualified_types" :
|
||||
[
|
||||
{
|
||||
"is_const" : true,
|
||||
"linker_set_key" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"name" : "const namespace_b::template_b<const B *>",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"self_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 4,
|
||||
"is_integral" : true,
|
||||
"linker_set_key" : "_ZTIi",
|
||||
"name" : "int",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"self_type" : "_ZTIi",
|
||||
"size" : 4
|
||||
}
|
||||
],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" : [],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "non_type_template",
|
||||
"name" : "non_type_template",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "return_type",
|
||||
"name" : "return_type",
|
||||
"referenced_type" : "_ZTI7STDCALL",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_arg_in_namespace",
|
||||
"name" : "template_arg_in_namespace",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" : [],
|
||||
"pointer_types" : [],
|
||||
"qualified_types" : [],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" : [],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" :
|
||||
[
|
||||
{
|
||||
"function_name" : "inline_function",
|
||||
"linker_set_key" : "_Z15inline_function10template_cIJ10template_dIJA_N11namespace_c1CEEEEE",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"referenced_type" : "_ZTI10template_cIJ10template_dIJA_N11namespace_c1CEEEEE"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIRN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"access" : "private",
|
||||
"function_name" : "InvalidClass::member_function",
|
||||
"linker_set_key" : "_ZN12InvalidClass15member_functionE1E",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"is_this_ptr" : true,
|
||||
"referenced_type" : "_ZTIP12InvalidClass"
|
||||
},
|
||||
{
|
||||
"referenced_type" : "_ZTI1E"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIN12InvalidClass1DE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "a",
|
||||
"name" : "a",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "b",
|
||||
"name" : "b",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "c",
|
||||
"name" : "c",
|
||||
"referenced_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_in_macro",
|
||||
"name" : "template_in_macro",
|
||||
"referenced_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIRN11namespace_a1AE",
|
||||
"name" : "namespace_a::A &",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"self_type" : "_ZTIRN11namespace_a1AE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"pointer_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP12InvalidClass",
|
||||
"name" : "InvalidClass *",
|
||||
"referenced_type" : "_ZTI12InvalidClass",
|
||||
"self_type" : "_ZTIP12InvalidClass",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"name" : "TemplateInMacro<F> *",
|
||||
"referenced_type" : "_ZTI15TemplateInMacroIJ1FEE",
|
||||
"self_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"qualified_types" :
|
||||
[
|
||||
{
|
||||
"is_const" : true,
|
||||
"linker_set_key" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"name" : "const namespace_b::template_b<const B *>",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"self_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 4,
|
||||
"is_integral" : true,
|
||||
"linker_set_key" : "_ZTIi",
|
||||
"name" : "int",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"self_type" : "_ZTIi",
|
||||
"size" : 4
|
||||
}
|
||||
],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" : [],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "non_type_template",
|
||||
"name" : "non_type_template",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "return_type",
|
||||
"name" : "return_type",
|
||||
"referenced_type" : "_ZTI7STDCALL",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_arg_in_namespace",
|
||||
"name" : "template_arg_in_namespace",
|
||||
"referenced_type" : "_ZTIi",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/known_issues.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" : [],
|
||||
"pointer_types" : [],
|
||||
"qualified_types" : [],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"array_types" : [],
|
||||
"builtin_types" : [],
|
||||
"elf_functions" : [],
|
||||
"elf_objects" : [],
|
||||
"enum_types" : [],
|
||||
"function_types" : [],
|
||||
"functions" :
|
||||
[
|
||||
{
|
||||
"function_name" : "inline_function",
|
||||
"linker_set_key" : "_Z15inline_function10template_cIJ10template_dIJA_N11namespace_c1CEEEEE",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"referenced_type" : "_ZTI10template_cIJ10template_dIJA_N11namespace_c1CEEEEE"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIRN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"access" : "private",
|
||||
"function_name" : "InvalidClass::member_function",
|
||||
"linker_set_key" : "_ZN12InvalidClass15member_functionE1E",
|
||||
"parameters" :
|
||||
[
|
||||
{
|
||||
"is_this_ptr" : true,
|
||||
"referenced_type" : "_ZTIP12InvalidClass"
|
||||
},
|
||||
{
|
||||
"referenced_type" : "_ZTI1E"
|
||||
}
|
||||
],
|
||||
"return_type" : "_ZTIN12InvalidClass1DE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"global_vars" :
|
||||
[
|
||||
{
|
||||
"linker_set_key" : "a",
|
||||
"name" : "a",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "b",
|
||||
"name" : "b",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "c",
|
||||
"name" : "c",
|
||||
"referenced_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"linker_set_key" : "template_in_macro",
|
||||
"name" : "template_in_macro",
|
||||
"referenced_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"lvalue_reference_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIRN11namespace_a1AE",
|
||||
"name" : "namespace_a::A &",
|
||||
"referenced_type" : "_ZTIN11namespace_a1AE",
|
||||
"self_type" : "_ZTIRN11namespace_a1AE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"pointer_types" :
|
||||
[
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP12InvalidClass",
|
||||
"name" : "InvalidClass *",
|
||||
"referenced_type" : "_ZTI12InvalidClass",
|
||||
"self_type" : "_ZTIP12InvalidClass",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
},
|
||||
{
|
||||
"alignment" : 8,
|
||||
"linker_set_key" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"name" : "TemplateInMacro<F> *",
|
||||
"referenced_type" : "_ZTI15TemplateInMacroIJ1FEE",
|
||||
"self_type" : "_ZTIP15TemplateInMacroIJ1FEE",
|
||||
"size" : 8,
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"qualified_types" :
|
||||
[
|
||||
{
|
||||
"is_const" : true,
|
||||
"linker_set_key" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"name" : "const namespace_b::template_b<const B *>",
|
||||
"referenced_type" : "_ZTIN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"self_type" : "_ZTIKN11namespace_b10template_bIJPKNS_1BEEEE",
|
||||
"source_file" : "development/vndk/tools/header-checker/tests/integration/cpp/header/undeclared_types.h"
|
||||
}
|
||||
],
|
||||
"record_types" : [],
|
||||
"rvalue_reference_types" : []
|
||||
}
|
||||
@@ -133,14 +133,6 @@ class HeaderCheckerTest(unittest.TestCase):
|
||||
def test_example3_h(self):
|
||||
self.run_and_compare_name_cpp('example3.h')
|
||||
|
||||
def test_undeclared_types_h(self):
|
||||
self.prepare_and_absolute_diff_all_archs(
|
||||
'undeclared_types.h', 'undeclared_types.h')
|
||||
|
||||
def test_known_issues_h(self):
|
||||
self.prepare_and_absolute_diff_all_archs(
|
||||
'known_issues.h', 'known_issues.h')
|
||||
|
||||
def test_libc_and_cpp(self):
|
||||
self.prepare_and_run_abi_diff_all_archs(
|
||||
"libc_and_cpp", "libc_and_cpp", 0)
|
||||
|
||||
Reference in New Issue
Block a user