<div class="gmail_quote">On Mon, Jul 2, 2012 at 2:19 AM, Philip Dunstan <span dir="ltr"><<a href="mailto:phil@philipdunstan.com" target="_blank">phil@philipdunstan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Again, with a few bug fixes...</div><div class="im HOEnZb"><div><br></div>Phil<br>--<br>Philip Dunstan<br><a href="mailto:phil@philipdunstan.com" target="_blank">phil@philipdunstan.com</a><br><a href="http://www.philipdunstan.com" target="_blank">www.philipdunstan.com</a><br>



<br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_quote">On Sun, Jul 1, 2012 at 11:31 PM, Philip Dunstan <span dir="ltr"><<a href="mailto:phil@philipdunstan.com" target="_blank">phil@philipdunstan.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Hi everyone,</div><div><br></div><div>I'd like to submit my refactoring tool that adds the override specifier to appropriate virtual functions to the clang tooling branch. Given the recent discussion on this list about creating a larger refactoring tool with many different C++11 refactoring options  I thought I would submit it here for discussion before submitting it to cfe-commit list.</div>
</blockquote></div></div></div></blockquote><div><br></div><div>Cool stuff :) Feel free to check this into the tooling branch. Before it goes anywhere else it would obviously need tests...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Regardless of the discussion on the larger tool, I think that the add-override-specifier example is still a useful example of the work that has been done in the tooling branch. It includes writing a custom ASTMatcher to identify virtual functions which are candidates for the override keyword. It also demonstrates a different problem than the rename-method example and remove-cstr-calls tool on which it is based.  If there isn't any opposition to this, I will submit it to cfe-commit.</div>
</blockquote></div></div></div></blockquote><div><br></div><div>We'll need to figure out a place where to put those tools. At the moment the AST matchers are not in mainline yet.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I am still not entirely happy with the technique used to identify where the override keyword should be inserted and would welcome discussion on this problem.</div>
</blockquote></div></div></div></blockquote><div><br></div><div>I think currently the best way to do this is to re-lex those parts (cc'ed djasper, who has more hands on experience with that).</div><div><br></div><div>
A different question is how much information we want to store in the AST to make it easier for tools to figure out the answers to questions like "where is the right place to put attributes for this function declaration?".</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div><div><br></div></div>