[cfe-dev] add-override-specifier example tool

Philip Dunstan phil at philipdunstan.com
Sun Jul 1 14:31:42 PDT 2012


Hi everyone,

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.

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.

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.

Thanks,
Phil
--
Philip Dunstan
phil at philipdunstan.com
www.philipdunstan.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120701/8d50e5b0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-override-specifier_example.patch
Type: application/octet-stream
Size: 7599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120701/8d50e5b0/attachment.obj>


More information about the cfe-dev mailing list