<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66022>66022</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] how to tell the difference at preprocessor time between clang-tidy and llvm
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy,
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
finchky
</td>
</tr>
</table>
<pre>
I need to be able to exclude certain includes and sections of code when using clang-tidy but not when compiling with LLVM. It seems that both clang-tidy and LLVM define `__clang__` and `__llvm__` which is how I usually differentiate LLVM from GCC.
What preprocessor check can I do to handle this?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcksuO2zoMhp9G3hBjOPItWXgxJ4EPAky37TLQhbbUkaVAouvm7Qs5RWfajS2Rv36KHyVSsrNHHFj7H2svhVjJhDhM1ivz_ihk0I_hCh5RAwWQCEI6zEv8qdyqERRGEtaD9fs-gfAaEiqywScIE6igETaDHtZk_QzKCT-_kNUPkCuBD_TMqrDcrcuKzZKBt7evX0q4EiTEJQEZQSADmc_nc6msA42T9Qisq263PX-7sa7a83vMuR_LM7QZqwzYBCZscIU1rcK5B2g7TRjRkxWET88phgX-P59LVl1Y9fr8fsvXuEe8x6AwpRBBGVTvoISHK-iQyRjhdWZkbGL1WOih1qf6JAocDt2pafpD3x4LM0iBx142daP0pAR2bYNdL0XXT113aqq-sAOveF2dDgfO67Y9lm3TS9lXrTzII3JxZE2Fi7CuzO2VIc6FTWnFoesqzgsnJLq0z5XzD2iMc8bPjHOPG-z6HGkvRRyyzYtc58SaytlE6cOYLLn9jXwyai87RApA6ByQwT8YFcK_nMguCBJpwzzrv2eYyxRrdIMhuidWvzI-Mj7OlswqSxUWxses-f17ucfwHRUxPu4NJMbHvedfAQAA__8LT-92">