<div dir="ltr">In conclusion: <div>Should AST matchers should return non-const pointers to comply with Clang coding standard for immutable objects?<br><div class="gmail_extra"><br><div class="gmail_quote">2017-10-04 11:14 GMT-07:00 John McCall via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Oct 4, 2017, at 3:30 AM, Csaba Raduly via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> On Wed, Oct 4, 2017 at 2:20 AM, John McCall via cfe-dev<br>
> <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> The AST is largely immutable by design, and the best solution would probably<br>
>> be to adopt what LLVM did to Type and just mass-refactor code to stop<br>
>> passing around const pointers at all.<br>
><br>
> If the AST is meant to be immutable, why not pass const<br>
> {pointers,references} around?<br>
<br>
</span>If the objects are actually immutable, const is just noise repeated everywhere, because a non-const object is basically a useless type.<br>
<br>
John.<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div></div>