mesa/src/asahi/compiler/test
Alyssa Rosenzweig 17355f716b treewide: use UTIL_DYNARRAY_INIT
Instead of util_dynarray_init(&dynarray, NULL), just use
UTIL_DYNARRAY_INIT instead. This is more ergonomic.

Via Coccinelle patch:

    @@
    identifier dynarray;
    @@

    -struct util_dynarray dynarray = {0};
    -util_dynarray_init(&dynarray, NULL);
    +struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;

    @@
    identifier dynarray;
    @@

    -struct util_dynarray dynarray;
    -util_dynarray_init(&dynarray, NULL);
    +struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;

    @@
    expression dynarray;
    @@

    -util_dynarray_init(&(dynarray), NULL);
    +dynarray = UTIL_DYNARRAY_INIT;

    @@
    expression dynarray;
    @@

    -util_dynarray_init(dynarray, NULL);
    +(*dynarray) = UTIL_DYNARRAY_INIT;

Followed by sed:

    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(&\(.*\), NULL)/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init( &\(.*\), NULL )/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
    bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(\(.*\), NULL)/*\1 = UTIL_DYNARRAY_INIT/g' \{} \;"

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38189>
2025-11-04 13:39:48 +00:00
..
agx_test.h treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
test-compact-constants.cpp agx: test constant compaction 2024-03-30 00:26:18 +00:00
test-lower-parallel-copy.cpp agx: lower swaps late 2024-10-05 18:30:12 +00:00
test-lower-pseudo.cpp agx: Remove and/or/xor pseudo ops 2024-02-14 21:02:29 +00:00
test-lower-spill.cpp agx: allocate scratch in spilling unit test 2024-10-05 18:30:11 +00:00
test-minifloat.cpp asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
test-optimizer.cpp agx: add tests for sign/zero-extend propagate 2024-11-11 14:33:02 +00:00
test-repair-ssa.cpp agx: add tests for SSA repair 2024-03-30 00:26:18 +00:00