Skip to content

Commit 0d9f872

Browse files
committed
Fixup clang-tools-extra
1 parent a9a1c7d commit 0d9f872

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ bool IncludeFixerActionFactory::runInvocation(
9494

9595
// Create the compiler's actual diagnostics engine. We want to drop all
9696
// diagnostics here.
97-
Compiler.createDiagnostics(Files->getVirtualFileSystem(),
98-
new clang::IgnoringDiagConsumer,
97+
Compiler.createDiagnostics(new clang::IgnoringDiagConsumer,
9998
/*ShouldOwnClient=*/true);
10099
Compiler.createSourceManager(*Files);
101100

clang-tools-extra/clangd/Compiler.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,9 @@ prepareCompilerInstance(std::unique_ptr<clang::CompilerInvocation> CI,
147147
}
148148

149149
auto Clang = std::make_unique<CompilerInstance>(std::move(CI));
150-
Clang->createDiagnostics(*VFS, &DiagsClient, false);
151-
152-
if (auto VFSWithRemapping = createVFSFromCompilerInvocation(
153-
Clang->getInvocation(), Clang->getDiagnostics(), VFS))
154-
VFS = VFSWithRemapping;
155-
Clang->createFileManager(VFS);
156-
150+
Clang->createVirtualFileSystem(VFS, &DiagsClient);
151+
Clang->createDiagnostics(&DiagsClient, false);
152+
Clang->createFileManager();
157153
if (!Clang->createTarget())
158154
return nullptr;
159155

clang-tools-extra/include-cleaner/unittests/RecordTest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,10 @@ TEST_F(PragmaIncludeTest, ExportInUnnamedBuffer) {
646646
*Diags, "clang"));
647647

648648
auto Clang = std::make_unique<CompilerInstance>(std::move(Invocation));
649-
Clang->createDiagnostics(*VFS);
649+
Clang->createVirtualFileSystem(VFS);
650+
Clang->createDiagnostics();
650651

651-
auto *FM = Clang->createFileManager(VFS);
652+
auto *FM = Clang->createFileManager();
652653
ASSERT_TRUE(Clang->ExecuteAction(*Inputs.MakeAction()));
653654
EXPECT_THAT(
654655
PI.getExporters(llvm::cantFail(FM->getFileRef("foo.h")), *FM),

0 commit comments

Comments
 (0)