<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 6:44 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 dir="ltr"><div>Thanks everyone for your feedback,</div><div><br></div>I've attached a new set of patches with the changes suggested by Dmitri, Matthieu and Edwin. I implemented many of the suggested changes but there are a couple of changes that I made or didn't make that I wanted to highlight.<div>



<br></div><div>I've replaced the use of the isCanonicalDecl matcher with hasParent(recordDecl()) as suggested by Dmitri. I have removed the addition of the isCanonicalDecl matcher from my patch to ASTMatchers.h and ASTMatchersTests.cpp.</div>



<div><br></div><div>I haven't modified yet how the insertion point for the override keyword is calculated. Dmitri suggested FunctionTypeLoc::getRParenLoc() but I don't think that this will work if there is a trailing const keyword or deferred return type. It's possible that with a bit of work this could be made to work, but I am concerned that there might be other situations where this wouldn't work that I am not aware of.</div>



<div><br></div><div>Following Edwin's suggestion I am passing -std=c++11 to the cpp11-migrate tool in the unit tests to fix the warnings I was seeing.<br><div class="gmail_extra"><br></div><div class="gmail_extra">
Dmitri suggested not using definitions such as</div><div class="gmail_extra">const char *Method = "method";</div><div class="gmail_extra">at TU scope in AddOverrideMatchers.cpp. I have left this as it is for now. I agree that there are concerns with such definitions but I would prefer this definition than a string literal in AddOverride.cpp. <br>



</div><div class="gmail_extra"><br></div><div class="gmail_extra">I have not implemented Matthieu's suggestion for finding a macro which matches the override keyword. I think that this would be an excellent thing to support but haven't done so because of the difficulty accessing the required Preprocessor object.</div>
<div class="im">


<div class="gmail_extra"><br></div></div></div></div></blockquote><div><br>I think this is definitely more ambitious, so something that can be tacked on later. As Vane said, at worst it could simply be an option: --add-override=LLVM_OVERRIDE.<br>
<br>There is certainly no reason to defer adding the new transformation for that.<br><br>-- Matthieu<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div><div class="im"><div class="gmail_extra"></div><div class="gmail_extra"><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></div>


<br></div></div></div></div>
</blockquote></div><br>