[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

kleines Filmröllchen via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 02:54:52 PST 2024


kleinesfilmroellchen wrote:

> > What is the relationship between this patch, and clangd 17's ["missing include" warning](https://clangd.llvm.org/guides/include-cleaner#missing-include-warning)? Does the quick-fix for the "missing include" warning also respect these config options?
> 
> Same question from me -- this is the main reason I personally care about this PR :) We have directories in our project tree that we'd like to be included as `#include <dir/foo.h>` (as those would be installed system-wide in an open-source version) and others that we'd like to be included as `#include "dir/foo.h"` (internal headers that are in the same subtree as the C++ source) and I'd really like clangd in vscode to suggest fixing the missing include warnings appropriately. Thanks!

As far as I can tell, clangd uses the correct header style for inserted includes regardles of how those includes are created (via auto-include on code completion or fix suggestions).

https://github.com/llvm/llvm-project/pull/67749


More information about the cfe-commits mailing list