I’m trying to use the ‘UnusedIncludes’ feature of clangd with vscode on macOS 12.6.1. However I get the
Unknown Diagnostics key 'UnusedIncludes' warning for my config file. Anyone knows what could be the problem?
This is the clang version that I use:
Apple clangd version 14.0.0 (clang-1400.0.29.202)
Platform: x86_64-apple-darwin21.6.0; target=arm64-apple-darwin21.6.0
And this is my config file:
it’s about apple’s version numbers differing from real clang versions. llvm-project/Config.h at db0486c46fe187475e4b01a401e14b2def593733 · apple/llvm-project · GitHub seems to be state of clangd at the release of apple clang 14, which isn’t really clang-14 release (and doesn’t contain UnusedIncludes yet).
you can try getting a newer version of clangd through other methods. One is releases at Releases · clangd/clangd · GitHub.
Thanks for your answer, I didn’t realize that. Maybe I’ll try building apple clang since I need the iphoneos toolchain as well.