[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

Vadim D. via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 31 16:53:17 PDT 2024


================
@@ -62,15 +64,6 @@ issueIncludeCleanerDiagnostics(ParsedAST &AST, llvm::StringRef Code,
                                const ThreadsafeFS &TFS,
                                HeaderFilter IgnoreHeader = {});
 
-/// Affects whether standard library includes should be considered for
-/// removal. This is off by default for now due to implementation limitations:
-/// - macros are not tracked
-/// - symbol names without a unique associated header are not tracked
-/// - references to std-namespaced C types are not properly tracked:
-///   instead of std::size_t -> <cstddef> we see ::size_t -> <stddef.h>
-/// FIXME: remove this hack once the implementation is good enough.
-void setIncludeCleanerAnalyzesStdlib(bool B);
----------------
vvd170501 wrote:

At first I considered adding a global flag similar to `--include-cleaner-stdlib`, but then thought that having more fine-grained control would be better.

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


More information about the cfe-commits mailing list