Windows
-
Extract the
tar.xzformat file into the final destination. In this guide theC:\Community\clangpath is used. Also suggested to rename the long folder name to indicate only the version, in this casev19.1.6. You can use7-zipprogram or the integratedExtract allbutton on Windows 11.
Fig. 1. Extract the archive
Fig. 2. Folder structure on Windows -
Add directory which includes the clang-tidy.exe to the
Pathenvironment variable.This step is needed in order to be able to use only the
clang-tidycommand. Without this the full path of the tool shall be used, likeC:\Community\clang\v19.1.6\bin\clang-tidy.exe.-
Type
environment variableinto the search field on the taskbar and click on theEdit the system environment variables.
Fig. 3. Searching for system environment variables -
In the System Properties window click on
Environment Variables…on the bottom-right.
Fig. 4. Open Environment Variables.. tab -
Click on the
Pathat System variables and press theEdit…button
Fig. 5. Edit system variables - Path -
Add new entry with the needed path of clang-tidy -
C:\Community\clang\v19.1.6\bin.
Fig. 6. Add the path of the folder which contains the clang-tidy.exe
Take into account if more clang-tidy tool is available on
Paththen the upper one in the list will be applied. Entries can be moved byMove UpandMove Down buttons. -
-
Check the installation by opening a
Command Prompt(CMD) and typing the command below.clang-tidy --versionThe following message should be displayed.
LLVM (http://llvm.org/): LLVM version 19.1.6 Optimized build.