Windows
-
Extract the
tar.xz
format file into the final destination. In this guide theC:\Community\clang
path is used. Also suggested to rename the long folder name to indicate only the version, in this casev19.1.6
. You can use7-zip
program or the integratedExtract all
button on Windows 11.Fig. 1. Extract the archiveFig. 2. Folder structure on Windows -
Add directory which includes the clang-tidy.exe to the
Path
environment variable.This step is needed in order to be able to use only the
clang-tidy
command. Without this the full path of the tool shall be used, likeC:\Community\clang\v19.1.6\bin\clang-tidy.exe
.-
Type
environment variable
into 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
Path
at System variables and press theEdit…
buttonFig. 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
Path
then the upper one in the list will be applied. Entries can be moved byMove Up
andMove Down buttons
. -
-
Check the installation by opening a
Command Prompt
(CMD) and typing the command below.clang-tidy --version
The following message should be displayed.
LLVM (http://llvm.org/): LLVM version 19.1.6 Optimized build.