<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61994>61994</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Correct way to set up clang-tidy with CMake and Visual Studio/MSVC?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dantamont
      </td>
    </tr>
</table>

<pre>
    Hi all, [I have tracked down a few threads](https://gitlab.kitware.com/cmake/cmake/-/issues/20512) online that seem to imply that something like this should work using Visual Studio with CMake. 

```
Error   G13DA7946       use of undeclared identifier 'value' [clang-diagnostic-error] 
Error   G13DA7946       use of undeclared identifier 'value' [clang-diagnostic-error] 
Error   G13DA7946       use of undeclared identifier 'value' [clang-diagnostic-error] 
Error   G13DA7946       use of undeclared identifier 'value' [clang-diagnostic-error] 
Error   G13DA7946       use of undeclared identifier 'value' [clang-diagnostic-error] 
```

However, the above setup isn't working for me.  I'm getting a bunch of clang-diagnostic errors, even though my code compiles and runs just fine when clang-tidy is disabled. Any ideas on where I can start poking around to diagnose what is going on?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVMGOozgQ_RrnUkpkDDThwKGns9npw5xGmnthV8ATY0d2OSh_vzKb1fT2_sAeRkK2MMWrV-V6D1OykycaRPtFtKcdZp5DHAx6xiV43o3BPIavFtA5od5AtF_eYcY7AUfUVzJgwuoB4UIr8BwJTRLtSajjzHxLon4V6izUebLscDxcLa8Y6aDDItRZL3ilD_teqLNNKVMS6qxkWymhegjeWU_AMzIkogU4gF1u7vE8CgvxbP0Ezl5LmE2Q5pCdgTXEK-RUvv2wKaOD75yNDbBanuHtG17pAEKehHx9ri_y-Wyvf8QYopD9n1V9eu365kXIPieCcIHsDWmHkQxYQ57txVIEobo7ukxCdaVT2qGf9sbi5ENiq_e0AbYnIfvfGf5PGT5d_N_r17DSnWIZe54JcAx3gkScb2CTF6rjbcLKeF1ChIUOAO9CdQtMxFyOEcbs9VyIfuYAG4dUwOlOHngOeZpheYAOhkCH5WYdJUBvIGaf4GdODJeihHUm_8Rjax5gExibcHRkDvDqH6UTmCD4EhkJ3kGjh8QYGW5h44sxZG-Kkp6MCipygZpCCQhe1OedGWrT1z3uaKhejvJYH5uj2s1Dpeq-Ra36tmuPuiEt-6pujJZmrJv2Uu3soKSqZSM7WddNow7ViKhV145j3_VtdRSNpAWtOzh3Xw4hTrtN-MNL1ffNzuFILv3jSXEoQfsxT0k00tnE6ddvbNnR8BZiJM2w4qMUlYgh3z726Jfit47-yw6EOn_7_uOtFJyjG_5jXHMen4ZVsj63_S2Gn6T5o2Vt5P8KAAD__9HWurA">