@@ -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,10 @@ 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, /* filter_implicitGenerated=*/ false ,
1329+ interpreter_args);
13271330
13281331 testing::internal::CaptureStdout ();
13291332 Interp->declare (" #include <iostream>" );
@@ -1372,7 +1375,10 @@ TEST(FunctionReflectionTest, JitCallAdvanced) {
13721375 } name;
13731376 )" ;
13741377
1375- GetAllTopLevelDecls (code, Decls);
1378+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1379+
1380+ GetAllTopLevelDecls (code, Decls, /* filter_implicitGenerated=*/ false ,
1381+ interpreter_args);
13761382 auto *CtorD
13771383 = (clang::CXXConstructorDecl*)Cpp::GetDefaultConstructor (Decls[0 ]);
13781384 auto Ctor = Cpp::MakeFunctionCallable (CtorD);
@@ -1410,7 +1416,10 @@ TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
14101416 int f1(int i) { return i * i; }
14111417 )" ;
14121418
1413- GetAllTopLevelDecls (code, Decls);
1419+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1420+
1421+ GetAllTopLevelDecls (code, Decls, /* filter_implicitGenerated=*/ false ,
1422+ interpreter_args);
14141423
14151424 Interp->process (R"(
14161425 #include <string>
@@ -1510,7 +1519,8 @@ TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
15101519 };
15111520 )" ;
15121521
1513- GetAllTopLevelDecls (code1, Decls1);
1522+ GetAllTopLevelDecls (code1, Decls1, /* filter_implicitGenerated=*/ false ,
1523+ interpreter_args);
15141524 ASTContext& C = Interp->getCI ()->getASTContext ();
15151525
15161526 std::vector<Cpp::TemplateArgInfo> argument = {C.IntTy .getAsOpaquePtr ()};
@@ -1715,8 +1725,8 @@ TEST(FunctionReflectionTest, Construct) {
17151725#ifdef _WIN32
17161726 GTEST_SKIP () << " Disabled on Windows. Needs fixing." ;
17171727#endif
1718-
1719- Cpp::CreateInterpreter ();
1728+ std::vector< const char *> interpreter_args = { " -include " , " new " };
1729+ Cpp::CreateInterpreter (interpreter_args );
17201730
17211731 Interp->declare (R"(
17221732 #include <new>
@@ -1777,7 +1787,8 @@ TEST(FunctionReflectionTest, ConstructNested) {
17771787 GTEST_SKIP () << " Disabled on Windows. Needs fixing." ;
17781788#endif
17791789
1780- Cpp::CreateInterpreter ();
1790+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1791+ Cpp::CreateInterpreter (interpreter_args);
17811792
17821793 Interp->declare (R"(
17831794 #include <new>
@@ -1837,7 +1848,8 @@ TEST(FunctionReflectionTest, Destruct) {
18371848 GTEST_SKIP () << " Disabled on Windows. Needs fixing." ;
18381849#endif
18391850
1840- Cpp::CreateInterpreter ();
1851+ std::vector<const char *> interpreter_args = {" -include" , " new" };
1852+ Cpp::CreateInterpreter (interpreter_args);
18411853
18421854 Interp->declare (R"(
18431855 #include <new>
0 commit comments