From 7e6c437fb413eb7ae102e8db869bb55a748411ff Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 17 Aug 2020 13:38:21 +0200 Subject: [PATCH] [lldb][NFC] Remove name parameter from CreateFunctionTemplateDecl It's unused and not documented. --- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 2 +- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp | 2 +- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h | 8 +++----- lldb/unittests/Symbol/TestTypeSystemClang.cpp | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 1344523..4b23ead 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -1244,7 +1244,7 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die, clang::FunctionTemplateDecl *func_template_decl = m_ast.CreateFunctionTemplateDecl( containing_decl_ctx, GetOwningClangModule(die), - template_function_decl, name, template_param_infos); + template_function_decl, template_param_infos); m_ast.CreateFunctionTemplateSpecializationInfo( template_function_decl, func_template_decl, template_param_infos); } diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index 23e0527..2ace212 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -1419,7 +1419,7 @@ static TemplateParameterList *CreateTemplateParameterList( clang::FunctionTemplateDecl *TypeSystemClang::CreateFunctionTemplateDecl( clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, - clang::FunctionDecl *func_decl, const char *name, + clang::FunctionDecl *func_decl, const TemplateParameterInfos &template_param_infos) { // /// Create a function template node. ASTContext &ast = getASTContext(); diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h index 32736ee..4ae1271 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h @@ -346,11 +346,9 @@ public: std::unique_ptr packed_args; }; - clang::FunctionTemplateDecl * - CreateFunctionTemplateDecl(clang::DeclContext *decl_ctx, - OptionalClangModuleID owning_module, - clang::FunctionDecl *func_decl, const char *name, - const TemplateParameterInfos &infos); + clang::FunctionTemplateDecl *CreateFunctionTemplateDecl( + clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, + clang::FunctionDecl *func_decl, const TemplateParameterInfos &infos); void CreateFunctionTemplateSpecializationInfo( clang::FunctionDecl *func_decl, clang::FunctionTemplateDecl *Template, diff --git a/lldb/unittests/Symbol/TestTypeSystemClang.cpp b/lldb/unittests/Symbol/TestTypeSystemClang.cpp index f43b4f5..3303a45 100644 --- a/lldb/unittests/Symbol/TestTypeSystemClang.cpp +++ b/lldb/unittests/Symbol/TestTypeSystemClang.cpp @@ -566,7 +566,7 @@ TEST_F(TestTypeSystemClang, TestFunctionTemplateConstruction) { // Create the actual function template. clang::FunctionTemplateDecl *func_template = m_ast->CreateFunctionTemplateDecl(TU, OptionalClangModuleID(), func, - "foo", empty_params); + empty_params); EXPECT_EQ(TU, func_template->getDeclContext()); EXPECT_EQ("foo", func_template->getName()); @@ -598,7 +598,7 @@ TEST_F(TestTypeSystemClang, TestFunctionTemplateInRecordConstruction) { // Create the actual function template. clang::FunctionTemplateDecl *func_template = m_ast->CreateFunctionTemplateDecl(record, OptionalClangModuleID(), func, - "foo", empty_params); + empty_params); EXPECT_EQ(record, func_template->getDeclContext()); EXPECT_EQ("foo", func_template->getName()); -- 2.7.4