[clang-tools-extra] 7bd56dd - Re-land [clangd] Add support for missing includes analysis.
Viktoriia Bakalova via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 8 04:31:21 PST 2023
Author: Viktoriia Bakalova
Date: 2023-03-08T12:19:17Z
New Revision: 7bd56ddaeeb578331d3dfc0c4a2fe2727d0d1861
URL: https://github.com/llvm/llvm-project/commit/7bd56ddaeeb578331d3dfc0c4a2fe2727d0d1861
DIFF: https://github.com/llvm/llvm-project/commit/7bd56ddaeeb578331d3dfc0c4a2fe2727d0d1861.diff
LOG: Re-land [clangd] Add support for missing includes analysis.
This reverts commit 2eb5ac99a76dbbf8ac68c538211fabeaa5ac0bfd.
Differential Revision: https://reviews.llvm.org/D145576
Added:
Modified:
clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp b/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
index 2e18c18a2662..85ac00a89e5c 100644
--- a/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
@@ -461,7 +461,7 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) {
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(
More information about the cfe-commits
mailing list