@@ -637,7 +637,8 @@ TEST(FunctionReflectionTest, ExistsFunctionTemplate) {
637637TEST (FunctionReflectionTest, InstantiateTemplateFunctionFromString) {
638638 if (llvm::sys::RunningOnValgrind ())
639639 GTEST_SKIP () << " XFAIL due to Valgrind report" ;
640- Cpp::CreateInterpreter ();
640+ std::vector<const char *> interpreter_args = { " -include" , " new" };
641+ Cpp::CreateInterpreter (interpreter_args);
641642 std::string code = R"( #include <memory>)" ;
642643 Interp->process (code);
643644 const char * str = " std::make_unique<int,int>" ;
@@ -1322,8 +1323,9 @@ TEST(FunctionReflectionTest, GetFunctionAddress) {
13221323#endif
13231324 std::vector<Decl*> Decls, SubDecls;
13241325 std::string code = " int f1(int i) { return i * i; }" ;
1326+ std::vector<const char *> interpreter_args = {" -include" , " new" };
13251327
1326- GetAllTopLevelDecls (code, Decls);
1328+ GetAllTopLevelDecls (code, Decls, false , interpreter_args );
13271329
13281330 testing::internal::CaptureStdout ();
13291331 Interp->declare (" #include <iostream>" );
@@ -1372,7 +1374,9 @@ TEST(FunctionReflectionTest, JitCallAdvanced) {
13721374 } name;
13731375 )" ;
13741376
1375- GetAllTopLevelDecls (code, Decls);
1377+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1378+
1379+ GetAllTopLevelDecls (code, Decls, false , interpreter_args);
13761380 auto *CtorD
13771381 = (clang::CXXConstructorDecl*)Cpp::GetDefaultConstructor (Decls[0 ]);
13781382 auto Ctor = Cpp::MakeFunctionCallable (CtorD);
@@ -1410,7 +1414,9 @@ TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
14101414 int f1(int i) { return i * i; }
14111415 )" ;
14121416
1413- GetAllTopLevelDecls (code, Decls);
1417+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1418+
1419+ GetAllTopLevelDecls (code, Decls, false , interpreter_args);
14141420
14151421 Interp->process (R"(
14161422 #include <string>
@@ -1510,7 +1516,7 @@ TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
15101516 };
15111517 )" ;
15121518
1513- GetAllTopLevelDecls (code1, Decls1);
1519+ GetAllTopLevelDecls (code1, Decls1, false , interpreter_args );
15141520 ASTContext& C = Interp->getCI ()->getASTContext ();
15151521
15161522 std::vector<Cpp::TemplateArgInfo> argument = {C.IntTy .getAsOpaquePtr ()};
@@ -1715,8 +1721,8 @@ TEST(FunctionReflectionTest, Construct) {
17151721#ifdef _WIN32
17161722 GTEST_SKIP () << " Disabled on Windows. Needs fixing." ;
17171723#endif
1718-
1719- Cpp::CreateInterpreter ();
1724+ std::vector< const char *> interpreter_args = { " -include " , " new " };
1725+ Cpp::CreateInterpreter (interpreter_args );
17201726
17211727 Interp->declare (R"(
17221728 #include <new>
@@ -1777,7 +1783,8 @@ TEST(FunctionReflectionTest, ConstructNested) {
17771783 GTEST_SKIP () << " Disabled on Windows. Needs fixing." ;
17781784#endif
17791785
1780- Cpp::CreateInterpreter ();
1786+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1787+ Cpp::CreateInterpreter (interpreter_args);
17811788
17821789 Interp->declare (R"(
17831790 #include <new>
@@ -1837,7 +1844,8 @@ TEST(FunctionReflectionTest, Destruct) {
18371844 GTEST_SKIP () << " Disabled on Windows. Needs fixing." ;
18381845#endif
18391846
1840- Cpp::CreateInterpreter ();
1847+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1848+ Cpp::CreateInterpreter (interpreter_args);
18411849
18421850 Interp->declare (R"(
18431851 #include <new>
0 commit comments