<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60444>60444</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Replace use of `SkipPast` with explicit reliance on value class from the AST
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:dataflow
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ymand
</td>
</tr>
</table>
<pre>
The dataflow framework provides the `SkipPast` mechanism to allow callers to optionally see "through" references and pointers. This is used for cases where a given AST node admits both rvalue and lvalues or even pointers and immediate values (object access). But, since it relies on the user, it's prone to errors and has in practice resulted in such. It also confuses new users.
Instead, we should drive the decision directly from the value class of the expression, where the API takes and expression. Otherwise, we should take input in the form of a value class, so the user has a clear indication of the basis of the decision, rather than introducing a new concept of "skipping". Finally, it should be required not optional. The optionality has hidden bugs in the past, where a `ReferenceValue` should *not* have been present but was and the tests missed that because of use of `SkipPast::Reference'.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVE2P2zgM_TXKhajhyPloDj6kWwToaYvOYO-0xETckSWvSCc7_34hT5K2wF6iWKIe-Z4eiSJ8SUS92X4x268rnDXk0r-PmPxqyP69fw0EHhXPMd_gXHCkWy5vMJV8ZU8CGgjMrn154-k7ippdCyO5gIllBM2AsV50GCMVqRt5Us4JY3wHIQJjrYaS50sw1kKhMxVKjgQweZgyJ6UiDbwGFmCBWcjDORdwKCRwC1QIEC58pQTHl1dI2ROgH1kFhqwByhXjTAtcXP4K5AJU4x_wyyGPI3lGJbhHGfs5D3-TU0DnSMTYQwPwZVZj_wDh5AhYoVDkCpkWJWahUo9Zjd1LVSlRJU2l5HuegAKcYCrolB1BIZmjkq-bMrvQwDcFjJLB5XSeK8tEtwVZGtN-Ne3x4_dbEiX0Nd2NQEKeowdf-EpLKZ4cC-cEngs5je9wLnlcjj4UcRFFIJ-XLfp3KiQ1fsFbZK37x-_fQPHt_h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