[clang] [clang-repl] Typo within InterpreterTest.cpp (PR #79119)
Nashe Mncube via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 23 02:51:17 PST 2024
https://github.com/nasherm created https://github.com/llvm/llvm-project/pull/79119
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.
>From 91a0b265ce85359efb60821b419bb9754e48bdbe Mon Sep 17 00:00:00 2001
From: nasmnc01 <nashe.mncube at arm.com>
Date: Tue, 23 Jan 2024 10:43:08 +0000
Subject: [PATCH] [clang-repl] Typo within InterpreterTest.cpp
Recent changes to InterpreterTest.cpp introduced typos
within code passed to a Parse() function. This causes some
tests to fail, namely IncrementalProcessing.InstantiateTemplate.
Change-Id: I79a09030f980b1bc766e27cc6acb944fbc2422ac
---
clang/unittests/Interpreter/InterpreterTest.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
}
More information about the cfe-commits
mailing list