clangd: macOS 10.15 Catalina: error in finding header
OS: macOS 10.15 Catalina
clangd: version 9.0.0 (tags/RELEASE_900/final); installed by brew install llvm
; used in VS Code with vscode-clangd.
Problem: After updating to macOS 10.15 Catalina, clangd keeps reporting errors in finding headers.

After searching, I found a discussion on StackOverflow: It seems Apple stops supporting putting headers under /usr/include
, which results in the issue.
I wonder whether there any way to keep using clangd in macOS 10.15.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 15 (8 by maintainers)
Commits related to this issue
- [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. Summary: This was originally committed in 88bccded8fa169481fa367debf5ec615640635a1, and reverted in 93f77617abb... — committed to llvm/llvm-project by sam-mccall 5 years ago
- [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac. Summary: Fixes https://github.com/clangd/clangd/issues/211 Fixes https://github.com/clangd/clangd/issues/178 No tests -... — committed to arichardson/llvm-project by sam-mccall 5 years ago
- [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. Summary: This was originally committed in 88bccded8fa169481fa367debf5ec615640635a1, and reverted in 93f77617abb... — committed to arichardson/llvm-project by sam-mccall 5 years ago
- [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac. Summary: Fixes https://github.com/clangd/clangd/issues/211 Fixes https://github.com/clangd/clangd/issues/178 No tests -... — committed to sourcegraph/lsif-clang by sam-mccall 5 years ago
- [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. Summary: This was originally committed in 88bccded8fa169481fa367debf5ec615640635a1, and reverted in 93f77617abb... — committed to sourcegraph/lsif-clang by sam-mccall 5 years ago
instead of
g++
it should mention the full path ofclang
, which I believe is/usr/local/opt/llvm/bin/clang
in your case.btw, it will only help if you can compile c++ files using
/usr/local/opt/llvm/bin/clang
(without explicitly mentioningisysroot
or any other include path altering commands)