dawn-cmake/src
Ben Clayton 627732c408 src/reader tests: Have parse() return a unique_ptr
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>
2020-11-18 19:40:00 +00:00
..
ast ast: Support decoration kind hierarchies 2020-11-18 19:33:30 +00:00
diagnostic formatter: Remove colon line prefix with no source 2020-11-03 18:27:29 +00:00
inspector Big cleanup now that AST nodes are raw pointers 2020-11-16 16:41:47 +00:00
reader src/reader tests: Have parse() return a unique_ptr 2020-11-18 19:40:00 +00:00
transform [transformer] Remove deprecated Manager constructor 2020-11-18 19:40:00 +00:00
validator [validation] unittest v-0015: runtime array may only appear last in a structs 2020-11-18 18:40:10 +00:00
writer [spirv-writer] Support optional trailing return. 2020-11-18 18:25:30 +00:00
CMakeLists.txt [validation] unittest v-0015: runtime array may only appear last in a structs 2020-11-18 18:40:10 +00:00
context.cc Replace use of std::unique_ptr<T> with T* for AST nodes 2020-11-16 16:31:07 +00:00
context.h Replace use of std::unique_ptr<T> with T* for AST nodes 2020-11-16 16:31:07 +00:00
namer.cc Place the namer into the context object. 2020-11-13 18:13:24 +00:00
namer.h Place the namer into the context object. 2020-11-13 18:13:24 +00:00
namer_test.cc Place the namer into the context object. 2020-11-13 18:13:24 +00:00
scope_stack.h [validation] Validates declaration name uniqueness 2020-08-11 20:44:06 +00:00
scope_stack_test.cc Adding support for testing BUILD.gn 2020-04-17 13:18:20 +00:00
source.cc Fixup lint errors. 2020-11-03 16:26:09 +00:00
source.h Fix all doxygen warnings 2020-11-02 18:02:18 +00:00
type_determiner.cc Replace use of std::unique_ptr<T> with T* for AST nodes 2020-11-16 16:31:07 +00:00
type_determiner.h Place the namer into the context object. 2020-11-13 18:13:24 +00:00
type_determiner_test.cc Big cleanup now that AST nodes are raw pointers 2020-11-16 16:41:47 +00:00
type_manager.cc Context object owns a TypeManager 2020-03-27 00:47:16 +00:00
type_manager.h ast::Builder: Make the interface more fluent 2020-11-17 15:23:48 +00:00
type_manager_test.cc ast/type: Have all tests derive from new TestHelper 2020-11-13 22:01:58 +00:00