Skip to content

Commit 48af188

Browse files
committed
Do not reset the interpreter after we took the ASTContext.
This should fix our valgrind reports.
1 parent 503ff16 commit 48af188

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

unittests/CppInterOp/ScopeReflectionTest.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,6 @@ TEST(ScopeReflectionTest, GetAllCppNames) {
683683
}
684684

685685
TEST(ScopeReflectionTest, InstantiateNNTPClassTemplate) {
686-
Cpp::CreateInterpreter();
687-
688686
std::vector<Decl *> Decls;
689687
std::string code = R"(
690688
template <int N>
@@ -697,9 +695,9 @@ TEST(ScopeReflectionTest, InstantiateNNTPClassTemplate) {
697695
enum { value = 1 };
698696
};)";
699697

700-
ASTContext& C = Interp->getCI()->getASTContext();
701698
GetAllTopLevelDecls(code, Decls);
702699

700+
ASTContext &C = Interp->getCI()->getASTContext();
703701
Cpp::TCppType_t IntTy = C.IntTy.getAsOpaquePtr();
704702
std::vector<Cpp::TemplateArgInfo> args1 = {{IntTy, "5"}};
705703
EXPECT_TRUE(Cpp::InstantiateClassTemplate(Decls[0], args1.data(),

0 commit comments

Comments
 (0)