<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59738>59738</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy]: clang-diagnostic-error can't find system header files
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
igagis
</td>
</tr>
</table>
<pre>
# To reproduce
create sample `main.cpp` file:
```cpp
#include <memory>
int main(int argc, const char** argv){
return 0;
}
```
run `clang-tidy`:
```
clang-tidy main.cpp
```
# Expected result
no errors found by `clang-tidy`
# Actual result
following error is reported by `clang-tidy`:
```
1 error generated.
Error while processing /home/ivan/prj/test/main.cpp.
/home/ivan/prj/test/main.cpp:1:10: error: 'memory' file not found [clang-diagnostic-error]
#include <memory>
^~~~~~~~
Found compiler error(s)
```
# version
```console
$ clang-tidy --version
Ubuntu LLVM version 16.0.0
Optimized build.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVE2TszYM_jXi4gkDIkA4cMi-Cae300vbuzEKeMfYjG2yTQ_97R0D2Wa_3lmGD49kPXpkPYg7J3tNVEP-BPkp4rMfjK1lz3vpotZ0txowY38YZmmyppsFQXKC5Li-hSXuiTk-TooYFMnIpY7FNEGRsItUBNm2E4pkvYNztWAmtVBzRwyyHyONxt4gOz_CS-1ZQAQ8hCW3vQD8wYTRzjMxcAt4BDwGxxWwgvJpjWOMMUt-tpolkG1GKE_vqDymsrMO_IXiut952d2C_wP5rerXTey13q-Rw_md_55IeOqYJTcrvzq0YWStsY5dzKw71t4-MniHcxR-5uoNysUoZV6k7lcwJl1olbEh22eIX9SUbuE9abLcUxev9vNifRmkIjZZI8i5kAuwGcxIgI28cg3YTPYZsPHkPGBzP5X4zvw7myE7puEJFFcyYQFYbtLAclEU08ZvBwb501pbJ3mvjfNS7NbA_PQNjTHIz_-u12poFlRhxkkqshsHPLggrV_390rWSaPfS91oZ9T9h8E9exDObvcm5s921n5mP3_-9dsdjKVFnMTJXdG_T16O8p_Q1Vmqe3tec0VdnXVVVvGI6rQoMcuy_IDRUPNciLYtigO1OaVFx9t9QtWFMsGpFdRFssYEMUWs0jIpEOOi4m1bXNL9Id8TVS3sExq5VLFS1zE2to-kczPVeVVmh0jxlpRb5geiphe2OAExjBNbh5hdO_cO9omSzrv_Ubz0ahk8DwLNT6Hpn3eViSCe0rOL1B1zN-dpZAPxjuyiDBfNVtWD95MLKscGsOmlH-Y2FmYEbELm7bObrHkmEfS38HWAzVLPfwEAAP__KACG6Q">