mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 22:17:51 +00:00
Add ProgramID feed it into all ast::Nodes
This will be used to detect accidental leaks of program objects between programs. Bug: tint:709 Change-Id: I20f784a2c673d19a04a880b3ec91dfe2eb743bdb Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47622 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
f01ed13a25
commit
e6995de232
@@ -367,7 +367,7 @@ inline std::ostream& operator<<(std::ostream& o, const DefInfo& di) {
|
||||
class StatementBuilder : public Castable<StatementBuilder, ast::Statement> {
|
||||
public:
|
||||
/// Constructor
|
||||
StatementBuilder() : Base(Source{}) {}
|
||||
StatementBuilder() : Base(ProgramID(), Source{}) {}
|
||||
|
||||
/// @param builder the program builder
|
||||
/// @returns the build AST node
|
||||
|
||||
@@ -32,8 +32,8 @@ class ForStmtTest : public ParserImplTest {
|
||||
EXPECT_FALSE(e_for.errored);
|
||||
EXPECT_FALSE(p_for->has_error()) << p_for->error();
|
||||
|
||||
std::string loop = ast::BlockStatement({}, e_loop.value).str(Sem());
|
||||
std::string for_ = ast::BlockStatement({}, e_for.value).str(Sem());
|
||||
std::string loop = ast::BlockStatement({}, {}, e_loop.value).str(Sem());
|
||||
std::string for_ = ast::BlockStatement({}, {}, e_for.value).str(Sem());
|
||||
EXPECT_EQ(loop, for_);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user