[clang] [clang-repl] Typo within InterpreterTest.cpp (PR #79119)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 23 02:52:05 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Nashe Mncube (nasherm)
<details>
<summary>Changes</summary>
Recent changes to InterpreterTest.cpp (https://github.com/llvm/llvm-project/pull/76218) introduced typos within code passed to a Parse() function. This causes some tests to fail, namely IncrementalProcessing.InstantiateTemplate.
---
Full diff: https://github.com/llvm/llvm-project/pull/79119.diff
1 Files Affected:
- (modified) clang/unittests/Interpreter/InterpreterTest.cpp (+2-1)
``````````diff
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index e76c0677db5ead1..6d2e5c79bc242ce 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -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);
return Addr;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/79119
More information about the cfe-commits
mailing list