<div dir="ltr"><div>Hi</div><div><br></div>These patches continue some work that I started back in July (before RL kicked in) to create a C++11 migration tool that would add the override specifier to suitable member functions where it could. I have reworked the tool to integrate it into the cpp11-migrate tool in the tool/extra repository.<div>


<br></div><div>There are two patches - one on the clang repo with some AST matchers and the other in tool/extra. I have a couple of questions for each of the patches that I would appreciate some help with.</div><div><br>

</div><div><br></div><div>add-override-clang_174296.patch<br></div>
<div>Adds ASTMatchers isCanonicalDecl, isVirtual and isOverride </div><div><br></div><div>Questions:</div><div>1. How do I unit test the negative of isCanonicalDecl?</div><div>2. Will someone help me with a better description of isCanonicalDecl for the comment?</div>


<div><br></div><div><br></div><div>add-override-clang_tools_extra_174296.patch<br></div><div><div>Adds the -add-override refactor to the cpp11-migrate tool</div><div><br></div><div>1. I don't like the work in AddOverrideActions.cpp to identify the desired location of the override keyword if there is an inlined body (work backwards from the start of the body to the first non-whitespace character). This doesn't work if there is a comment between the declaration and the body (shown in the comment_before_inline_body_fail test) and I don't think it is correct if there are user . Will someone please suggest a better way to do this?</div>


<div>2. I'm seeing a warning from the cpp11-migrate tool because C++11 is not enabled in the compiler options during the initial parsing of the source. I think that C++11 should be enabled as I expect this tool to be used on code that has already been partly migrated to C++11. I would also expect that this issue will arise as people run the migration tool with multiple refactoring tool options.</div>


</div><div><br></div><div><br></div><div style>Should I be using the git repo or <a href="http://llvm-reviews.chandlerc.com">llvm-reviews.chandlerc.com</a> for these changes?</div><div style><br></div><div>Thanks,</div><div>

Philip Dunstan</div><div><a href="mailto:phil@philipdunstan.com" target="_blank">phil@philipdunstan.com</a></div><div><a href="http://philipdunstan.com/" target="_blank">http://philipdunstan.com/</a></div>
<div><br></div><div> </div></div>