<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed 27 May 2020, 10:46 Stephan Bergmann, <<a href="mailto:sbergman@redhat.com">sbergman@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 27/05/2020 11:34, Stephen Kelly via cfe-dev wrote:<br>
> On Wed 27 May 2020, 09:25 Sam McCall, <<a href="mailto:sammccall@google.com" target="_blank" rel="noreferrer">sammccall@google.com</a> <br>
> <mailto:<a href="mailto:sammccall@google.com" target="_blank" rel="noreferrer">sammccall@google.com</a>>> wrote:<br>
>     In summary: it requires changes in consuming tools that are<br>
>     numerous, hard to find, hard to analyze, must all be done at once,<br>
>     and the changes aren't mechanically reliable.<br>
> <br>
> <br>
> Hmm, the location to call setTraversalKind on the ParentMapContext in <br>
> each external tool should be easy to find? Should be easy to analyze <br>
> too. There is presumably fewer places in your tool (or just one place in <br>
> the entire tool)  where ASTContexts are created, so "all" is either "1" <br>
> or close to it?<br>
> <br>
>     I expect this to bite people building tools against release versions<br>
>     to hit the same problems in a few months.<br>
> <br>
> <br>
> Perhaps the solution of changing the setting in the ParentMapContext <br>
> needs to be spelled out better in the release notes. It would also be <br>
> good to know whether doing so makes the impact on your tools manageable. <br>
> Can you look into that?<br>
<br>
As a side note:  When adapting LibreOffice's Clang plugin to this <br>
change, it wasn't clear to me whether that plugin would be allowed to <br>
call setTraversalKind (to set it back to the old TK_AsIs) on the global <br>
CompilerInstance's ASTContext's ParentMapContext, so I ended up using a <br>
private ParentMapContext for the plugin <br>
(<<a href="https://git.libreoffice.org/core/+/09aa5a9be8b9b3c88cf25b85e0eda28c5ef19aa4%5E!/" rel="noreferrer noreferrer" target="_blank">https://git.libreoffice.org/core/+/09aa5a9be8b9b3c88cf25b85e0eda28c5ef19aa4%5E!/</a>> <br>
"Adapt to changed clang::ASTContext::getParents behavior on Clang 11 <br>
trunk").</blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thanks for the feedback. I can at least update the release notes to make this more clear. </div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"><br></div><div dir="auto">Stephen. </div><div dir="auto"><br></div><div dir="auto"></div></div>