# Clang-tidy doesnt find stdlib

**URL:** https://discourse.nixos.org/t/clang-tidy-doesnt-find-stdlib/37641
**Category:** Help
**Created:** [January 2, 2024, 5:55pm UTC](https://discourse.nixos.org/t/clang-tidy-doesnt-find-stdlib/37641 "2024-01-02T17:55:20Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![gabyx](https://discourse.nixos.org/user_avatar/discourse.nixos.org/gabyx/32/11666_2.png) [@gabyx](https://discourse.nixos.org/u/gabyx)
#### Post date: [January 30, 2024, 7:52pm UTC](https://discourse.nixos.org/t/clang-tidy-doesnt-find-stdlib/37641/3 "2024-01-30T19:52:56Z")

</div>

Not related to clang-tidy but: I think `clang-tools` should be overriden with [Clangd issues on nixos: missing headers - #9 by gabyx](https://discourse.nixos.org/t/clangd-issues-on-nixos-missing-headers/11115/9)

```nix
          # C++
          # Clangd from clang-tools must come first.
          (hiPrio clang-tools.override {
            llvmPackages = llvmPackages_16;
            enableLibcxx = false;
          })
          # Do not use the clangd from this package as it does not work correctly with
          # stdlib headers.
          llvmPackages_16.libstdcxxClang

```

but I guess since you overwrite `stdenv` in `mkShell` I guess `pkgs.clang-tools` takes that, not sure. I guess it does not.

I think clang-tidy has the same troubles as `clangd`… I also need this somehow fixed…

---

_[View the full topic](https://discourse.nixos.org/t/clang-tidy-doesnt-find-stdlib/37641)._
