Using Clazy checks for Clang and C++
In this chapter, we will learn how to use the Clazy checks from the Clang toolset to automatically display warnings when obsolete Qt 5 classes and functions are detected in your Qt project.
How to do it…
Let’s get started by following these steps:
- We will use the same project from the preceding example. Then, proceed to open up the preferences window by going to Edit | Preferences….
- After that, go to the Analyzer page and click on the button beside Diagnostic configuration:
Figure 6.1 – Open up the Diagnostic configuration window
- Select the Default Clang-Tidy and Clazy checks option at the top and click the Copy… button, as shown in Figure 6.2. Give it a name and click OK. The new option will now appear under the Custom category:
Figure 6.2 - Click on the Copy button
- Then, open the Clazy Checks tab, enable the following...