Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using clang-based tools beyond loplugin

Bb2fd3b5456ad0012799b2045f4cd212?s=47 Miklos V
September 09, 2016
73

Using clang-based tools beyond loplugin

LibreOffice Conference 2016, Brno

Bb2fd3b5456ad0012799b2045f4cd212?s=128

Miklos V

September 09, 2016
Tweet

Transcript

  1. Using clang-based tools beyond loplugin By Miklos Vajna Senior Software

    Engineer at Collabora Productivity 2016-09-09 @CollaboraOffice www.CollaboraOffice.com
  2. 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
  3. 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
  4. 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
  5. 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