mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +00:00
The reason being that some tests called parse() twice, which will silently destruct the first parser. Once the `Module` owns the AST nodes, the second call will end up deleting all the AST nodes. Tests would then perform use-after-free for the AST nodes belonging to the first parser / module. There's no reason why the unique_ptr can't be returned, which is cleaner overall. Bug: tint:335 Change-Id: I7ff2e9777a7ebeb76702f806294fe4c2c49bd7c9 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33241 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org>