mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
ProgramBuilder: Don't wrap call-exprs with a call-stmts
ast::CallExpression will soon encompase function & intrinsic calls, along with type-constructors and type-casts. The latter two cannot be wrapped with a CallStatement, so change ProgramBuilder::WrapInStatement() to always assign the expression to a temporary. Fix the few places that actually relied on this behavior to use CallStmt() explicitly. Bug: tint:888 Change-Id: I48b8a2be73128df9cd2b4bdcc00ae81c4a872359 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69104 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
a539d8d33c
commit
9de93ca105
@@ -913,8 +913,8 @@ TEST_F(ResolverTest, Function_CallSites) {
|
||||
auto* call_2 = Call("foo");
|
||||
auto* bar = Func("bar", ast::VariableList{}, ty.void_(),
|
||||
{
|
||||
WrapInStatement(call_1),
|
||||
WrapInStatement(call_2),
|
||||
CallStmt(call_1),
|
||||
CallStmt(call_2),
|
||||
});
|
||||
|
||||
EXPECT_TRUE(r()->Resolve()) << r()->error();
|
||||
|
||||
Reference in New Issue
Block a user