aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/CompilerInstanceTest.cpp
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2024-11-21 13:04:30 +0100
committerSylvestre Ledru <sylvestre@debian.org>2024-11-21 13:04:30 +0100
commita1153cd6fedd4c906a9840987934ca4712e34cb2 (patch)
tree5b267500546cc06032b49c0153f6aa1e92cbb74c /clang/unittests/Frontend/CompilerInstanceTest.cpp
parent0b06301a1d839eb5f73559f6c3daf9049c34f3af (diff)
downloadllvm-a1153cd6fedd4c906a9840987934ca4712e34cb2.zip
llvm-a1153cd6fedd4c906a9840987934ca4712e34cb2.tar.gz
llvm-a1153cd6fedd4c906a9840987934ca4712e34cb2.tar.bz2
Revert "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)"
Reverted for causing: https://github.com/llvm/llvm-project/issues/117145 This reverts commit bdd10d9d249bd1c2a45e3de56a5accd97e953458.
Diffstat (limited to 'clang/unittests/Frontend/CompilerInstanceTest.cpp')
-rw-r--r--clang/unittests/Frontend/CompilerInstanceTest.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/unittests/Frontend/CompilerInstanceTest.cpp b/clang/unittests/Frontend/CompilerInstanceTest.cpp
index 07329eb2..5cf548e9 100644
--- a/clang/unittests/Frontend/CompilerInstanceTest.cpp
+++ b/clang/unittests/Frontend/CompilerInstanceTest.cpp
@@ -13,7 +13,6 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/VirtualFileSystem.h"
#include "gtest/gtest.h"
using namespace llvm;
@@ -54,8 +53,7 @@ TEST(CompilerInstance, DefaultVFSOverlayFromInvocation) {
const char *Args[] = {"clang", VFSArg.c_str(), "-xc++", "-"};
IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
- CompilerInstance::createDiagnostics(*llvm::vfs::getRealFileSystem(),
- new DiagnosticOptions());
+ CompilerInstance::createDiagnostics(new DiagnosticOptions());
CreateInvocationOptions CIOpts;
CIOpts.Diags = Diags;
@@ -89,9 +87,8 @@ TEST(CompilerInstance, AllowDiagnosticLogWithUnownedDiagnosticConsumer) {
auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
DiagnosticsOS, new DiagnosticOptions());
CompilerInstance Instance;
- IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
- Instance.createDiagnostics(*llvm::vfs::getRealFileSystem(), DiagOpts,
- DiagPrinter.get(), /*ShouldOwnClient=*/false);
+ IntrusiveRefCntPtr<DiagnosticsEngine> Diags = Instance.createDiagnostics(
+ DiagOpts, DiagPrinter.get(), /*ShouldOwnClient=*/false);
Diags->Report(diag::err_expected) << "no crash";
ASSERT_EQ(DiagnosticOutput, "error: expected no crash\n");