mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
The LHS should be wrapped in parentheses if it has lower precedence than the access. This fixes issues with pointer dereferences followed by member accesses, where we were previously generating *a.b. Fixed: tint:831 Change-Id: I8a194ad4f54c80a01c24eb983ec8064037575216 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51963 Kokoro: Kokoro <noreply+kokoro@google.com> Auto-Submit: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
15 lines
224 B
Plaintext
15 lines
224 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct S {
|
|
int i;
|
|
};
|
|
|
|
kernel void tint_symbol() {
|
|
thread S tint_symbol_2 = {};
|
|
thread S* const tint_symbol_1 = &(tint_symbol_2);
|
|
(*(tint_symbol_1)).i = 5;
|
|
return;
|
|
}
|
|
|