[PATCH] D145576: Re-land [clangd] Add support for missing includes analysis.

Viktoriia Bakalova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 04:19:21 PST 2023


VitaNuo created this revision.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
VitaNuo requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

This reverts commit 2eb5ac99a76dbbf8ac68c538211fabeaa5ac0bfd <https://reviews.llvm.org/rG2eb5ac99a76dbbf8ac68c538211fabeaa5ac0bfd>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145576

Files:
  clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp


Index: clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
===================================================================
--- clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
+++ clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
@@ -461,7 +461,7 @@
   Config Cfg;
   Cfg.Diagnostics.MissingIncludes = Config::IncludesPolicy::Strict;
   Cfg.Diagnostics.Includes.IgnoreHeader = {[](llvm::StringRef Header) {
-    return Header == testPath("buzz.h", llvm::sys::path::Style::posix);
+    return Header.ends_with("buzz.h");
   }};
   WithContextValue Ctx(Config::Key, std::move(Cfg));
   Annotations MainFile(R"cpp(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145576.503313.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230308/f2dc2042/attachment.bin>


More information about the cfe-commits mailing list