[PATCH] D131706: [clangd][unittests][IncludeCleaner] Don't call findReferencedFiles() if the result is not used
Aleksandr Platonov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 12 11:01:04 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG42ee0d8c16f7: [clangd][unittests][IncludeCleaner] Don't call findReferencedFiles() if theā¦ (authored by ArcsinX).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131706/new/
https://reviews.llvm.org/D131706
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
@@ -571,9 +571,6 @@
)cpp");
ParsedAST AST = TU.build();
- auto ReferencedFiles = findReferencedFiles(
- findReferencedLocations(AST), AST.getIncludeStructure(),
- AST.getCanonicalIncludes(), AST.getSourceManager());
EXPECT_THAT(AST.getDiagnostics(), llvm::ValueIs(IsEmpty()));
EXPECT_THAT(computeUnusedIncludes(AST), IsEmpty());
}
@@ -596,9 +593,6 @@
)cpp");
ParsedAST AST = TU.build();
- auto ReferencedFiles = findReferencedFiles(
- findReferencedLocations(AST), AST.getIncludeStructure(),
- AST.getCanonicalIncludes(), AST.getSourceManager());
EXPECT_THAT(AST.getDiagnostics(), llvm::ValueIs(IsEmpty()));
// FIXME: This is not correct: foo.h is unused but is not diagnosed as such
// because we ignore headers with IWYU export pragmas for now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131706.452237.patch
Type: text/x-patch
Size: 1061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220812/6d9a276b/attachment-0001.bin>
More information about the cfe-commits
mailing list