@@ -866,8 +866,7 @@ TEST_F(TestTypeSystemClang, TestFunctionTemplateConstruction) {
866866 clang::TranslationUnitDecl *TU = m_ast->GetTranslationUnitDecl ();
867867
868868 // Prepare the declarations/types we need for the template.
869- CompilerType clang_type =
870- m_ast->CreateFunctionType (int_type, nullptr , 0U , false , 0U );
869+ CompilerType clang_type = m_ast->CreateFunctionType (int_type, {}, false , 0U );
871870 FunctionDecl *func = m_ast->CreateFunctionDeclaration (
872871 TU, OptionalClangModuleID (), " foo" , clang_type, StorageClass::SC_None,
873872 false );
@@ -895,8 +894,7 @@ TEST_F(TestTypeSystemClang, TestFunctionTemplateInRecordConstruction) {
895894 clang::TagDecl *record = ClangUtil::GetAsTagDecl (record_type);
896895
897896 // Prepare the declarations/types we need for the template.
898- CompilerType clang_type =
899- m_ast->CreateFunctionType (int_type, nullptr , 0U , false , 0U );
897+ CompilerType clang_type = m_ast->CreateFunctionType (int_type, {}, false , 0U );
900898 // We create the FunctionDecl for the template in the TU DeclContext because:
901899 // 1. FunctionDecls can't be in a Record (only CXXMethodDecls can).
902900 // 2. It is mirroring the behavior of DWARFASTParserClang::ParseSubroutine.
@@ -930,10 +928,9 @@ TEST_F(TestTypeSystemClang, TestDeletingImplicitCopyCstrDueToMoveCStr) {
930928
931929 // Create a move constructor that will delete the implicit copy constructor.
932930 CompilerType return_type = m_ast->GetBasicType (lldb::eBasicTypeVoid);
933- CompilerType param_type = t.GetRValueReferenceType ();
934- CompilerType function_type =
935- m_ast->CreateFunctionType (return_type, ¶m_type, /* num_params*/ 1 ,
936- /* variadic=*/ false , /* quals*/ 0U );
931+ std::array<CompilerType, 1 > args{t.GetRValueReferenceType ()};
932+ CompilerType function_type = m_ast->CreateFunctionType (
933+ return_type, args, /* variadic=*/ false , /* quals*/ 0U );
937934 bool is_virtual = false ;
938935 bool is_static = false ;
939936 bool is_inline = false ;
@@ -974,10 +971,9 @@ TEST_F(TestTypeSystemClang, TestNotDeletingUserCopyCstrDueToMoveCStr) {
974971 bool is_artificial = false ;
975972 // Create a move constructor.
976973 {
977- CompilerType param_type = t.GetRValueReferenceType ();
978- CompilerType function_type =
979- m_ast->CreateFunctionType (return_type, ¶m_type, /* num_params*/ 1 ,
980- /* variadic=*/ false , /* quals*/ 0U );
974+ std::array<CompilerType, 1 > args{t.GetRValueReferenceType ()};
975+ CompilerType function_type = m_ast->CreateFunctionType (
976+ return_type, args, /* variadic=*/ false , /* quals*/ 0U );
981977 m_ast->AddMethodToCXXRecordType (
982978 t.GetOpaqueQualType (), class_name, nullptr , function_type,
983979 lldb::AccessType::eAccessPublic, is_virtual, is_static, is_inline,
@@ -1012,10 +1008,9 @@ TEST_F(TestTypeSystemClang, AddMethodToObjCObjectType) {
10121008
10131009 // Add a method to the interface.
10141010 std::vector<CompilerType> args;
1015- CompilerType func_type =
1016- m_ast->CreateFunctionType (m_ast->GetBasicType (lldb::eBasicTypeInt),
1017- args.data (), args.size (), /* variadic*/ false ,
1018- /* quals*/ 0 , clang::CallingConv::CC_C);
1011+ CompilerType func_type = m_ast->CreateFunctionType (
1012+ m_ast->GetBasicType (lldb::eBasicTypeInt), args, /* variadic*/ false ,
1013+ /* quals*/ 0 , clang::CallingConv::CC_C);
10191014 bool variadic = false ;
10201015 bool artificial = false ;
10211016 bool objc_direct = false ;
0 commit comments