This patch adds semantic checks for atomic capture construct.
Depends on D127620
NimishMishra on May 29 2022, 4:46 AM.Authored by
Two minor comments at the moment. Will review it later this week.
Can you split this patch? The small patch with single function is easier to review. If there are multiple checks with similar style, you can put them together.
check "write statement is of the form x = expr if atomic construct is write"
check "operator must refer to the intrinsic operator and not to a user-defined operator"
Or even split point 2 into three small patches.
The design of this solution could be improved. Following whatever reviews come in https://reviews.llvm.org/D127272, we can use the same basic structural checks from that patch here to understand what the statements 1 and 2 of the atomic capture construct actually are (among read/write/update statements). That would remove dependence on global boolean flags, which don't look good design wise.