[PATCH] D143496: [clangd] Add support for missing includes analysis.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 8 02:52:30 PST 2023
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp:464
+ Cfg.Diagnostics.Includes.IgnoreHeader = {
+ [](llvm::StringRef Header) { return Header == testPath("buzz.h"); }};
+ WithContextValue Ctx(Config::Key, std::move(Cfg));
----------------
Looks like this filter doesn't work on windows (the `/` vs `\` path separator might be the root cause here), I think a fix can be
- change the check to `return Header.endsWith("buzz.h")`
- or `return Header == testPath("buzz.h", llvm::sys::path::Style::posix)`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143496/new/
https://reviews.llvm.org/D143496
More information about the cfe-commits
mailing list