Skip to content

[clang-repl] Typo within InterpreterTest.cpp #79119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clang/unittests/Interpreter/InterpreterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ static Value AllocateObject(TypeDecl *TD, Interpreter &Interp) {
// cantFail(Interp.ParseAndExecute("new " + Name + "()", &Addr));

// The lifetime of the temporary is extended by the clang::Value.
cantFail(Interp.ParseAndExecute(Name + "()", &Addr));
cantFail(Interp.ParseAndExecute(Name + "();", &Addr));
Addr.setKind(Value::Kind::K_PtrOrObj);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why we need this? The missing semicolon on the previous line is on purpose. This tells the interpreter to store its result into the Value object.

return Addr;
}

Expand Down