Windows

  1. Extract the tar.xz format file into the final destination. In this guide the C:\Community\clang path is used. Also suggested to rename the long folder name to indicate only the version, in this case v19.1.6. You can use 7-zip program or the integrated Extract all button on Windows 11.

    extract archive win
    Fig. 1. Extract the archive
    folder struct win
    Fig. 2. Folder structure on Windows
  2. 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, like C:\Community\clang\v19.1.6\bin\clang-tidy.exe.

    1. Type environment variable into the search field on the taskbar and click on the Edit the system environment variables.

      search for env var win
      Fig. 3. Searching for system environment variables
    2. In the System Properties window click on Environment Variables…​ on the bottom-right.

      open sys env variables win
      Fig. 4. Open Environment Variables.. tab
    3. Click on the Path at System variables and press the Edit…​ button

      edit sys var path win
      Fig. 5. Edit system variables - Path
    4. Add new entry with the needed path of clang-tidy - C:\Community\clang\v19.1.6\bin.

      add clang path win
      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 by Move Up and Move Down buttons.

  3. 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.