Slide 1

Slide 1 text

Using clang-based tools beyond loplugin By Miklos Vajna Senior Software Engineer at Collabora Productivity 2016-09-09 @CollaboraOffice www.CollaboraOffice.com

Slide 2

Slide 2 text

2 / 5 LibreOffice Conference 2016, Brno | Miklos Vajna Beyond loplugin ● Compiler plugins ● Libtooling: ● Existing tools in clang-tools-extra ● Your own libtooling-based tools ● Libclang

Slide 3

Slide 3 text

3 / 5 LibreOffice Conference 2016, Brno | Miklos Vajna Existing tools in clang-tools-extra ● clang-apply-replacements ● clang-format ● clang-include-fixer ● clang-rename ● clang-tidy … and this is not the complete list

Slide 4

Slide 4 text

4 / 5 LibreOffice Conference 2016, Brno | Miklos Vajna Own tools in dev-tools.git ● Analyzer example: find-unused-prefixes ● m_nFooBar in core.git ● _fooBar in online.git ● FooBar in online.git for statics ● Rewriter example: rename ● Works from a CSV file ● Generated from… wait for it… find-unused- prefixes ● Obsoleted by clang-rename now

Slide 5

Slide 5 text

5 / 5 LibreOffice Conference 2016, Brno | Miklos Vajna Editor support via libclang ● YouCompleteMe, libclang-vim ● Precise: ● Inspect comment ● Jump to declaration ● Get (member) function name ● Referenced (member) function name ● Jump to include ● Rename ● Infer auto ● Autocomplete