Tooling & Testing

Improving Your Code Using Clang Tooling


B07 6.11.2019 11:30 - 12:30

Bookmark and Share

Kevin Funk
Kevin Funk
KDAB

Clang is a C/C++ compiler frontend which parses C++ source code. Since the beginning of its development, the Clang ecosystem had a strong focus on providing tooling around C++. Several tools exist, which help writing or debugging C++ or even Qt code. This talk will introduce you to several highly valuable tools backed by Clang, such as the Clang compiler frontend itself (for static analysis), the Clang static analyzer (for static analysis), clang-tidy (for static analysis, linting & refactoring of source code), clang-format (for enforcing a coding style on your code), Clang Sanitizers (dynamic analysis) and last but not least: Clazy (a compiler plugin for Clang that has additional checks for Qt code). For each tool in this presentation, we’ll do a brief introduction about its capabilities and then live-demonstrate its usage on a few code examples. We’ll also demonstrate how the Clang tools can be used on projects using build systems other than CMake, by applying a few tricks. Clang is available on all major platforms, thus these tools can be used freely on either Windows, Linux or macOS. (With some limitations of the Clang Sanitizers on the Windows platform.)