@@ -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,20 +971,20 @@ 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,
984980 is_explicit, is_attr_used, is_artificial);
985981 }
986982 // Create a copy constructor.
987983 {
988- CompilerType param_type = t.GetLValueReferenceType ().AddConstModifier ();
984+ std::array<CompilerType, 1 > args{
985+ t.GetLValueReferenceType ().AddConstModifier ()};
989986 CompilerType function_type =
990- m_ast->CreateFunctionType (return_type, ¶m_type, /* num_params */ 1 ,
987+ m_ast->CreateFunctionType (return_type, args ,
991988 /* variadic=*/ false , /* quals*/ 0U );
992989 m_ast->AddMethodToCXXRecordType (
993990 t.GetOpaqueQualType (), class_name, nullptr , function_type,
@@ -1012,10 +1009,9 @@ TEST_F(TestTypeSystemClang, AddMethodToObjCObjectType) {
10121009
10131010 // Add a method to the interface.
10141011 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);
1012+ CompilerType func_type = m_ast->CreateFunctionType (
1013+ m_ast->GetBasicType (lldb::eBasicTypeInt), args, /* variadic*/ false ,
1014+ /* quals*/ 0 , clang::CallingConv::CC_C);
10191015 bool variadic = false ;
10201016 bool artificial = false ;
10211017 bool objc_direct = false ;
@@ -1098,9 +1094,9 @@ TEST_F(TestTypeSystemClang, AddMethodToCXXRecordType_ParmVarDecls) {
10981094 llvm::SmallVector<CompilerType> param_types{
10991095 m_ast->GetBasicType (lldb::eBasicTypeInt),
11001096 m_ast->GetBasicType (lldb::eBasicTypeShort)};
1101- CompilerType function_type = m_ast-> CreateFunctionType (
1102- return_type, param_types. data (), /* num_params */ param_types. size () ,
1103- /* variadic=*/ false , /* quals*/ 0U );
1097+ CompilerType function_type =
1098+ m_ast-> CreateFunctionType ( return_type, param_types,
1099+ /* variadic=*/ false , /* quals*/ 0U );
11041100 m_ast->AddMethodToCXXRecordType (
11051101 t.GetOpaqueQualType (), " myFunc" , nullptr , function_type,
11061102 lldb::AccessType::eAccessPublic, is_virtual, is_static, is_inline,
0 commit comments