diff options
Diffstat (limited to 'clang/unittests/Tooling/RefactoringTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/RefactoringTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/unittests/Tooling/RefactoringTest.cpp b/clang/unittests/Tooling/RefactoringTest.cpp index c51d738ba66..b04c9a91ef7 100644 --- a/clang/unittests/Tooling/RefactoringTest.cpp +++ b/clang/unittests/Tooling/RefactoringTest.cpp @@ -608,14 +608,15 @@ public: llvm::raw_fd_ostream OutStream(FD, true); OutStream << Content; OutStream.close(); - const FileEntry *File = Context.Files.getFile(Path); - assert(File != nullptr); + auto File = Context.Files.getFile(Path); + assert(File); StringRef Found = TemporaryFiles.insert(std::make_pair(Name, Path.str())).first->second; assert(Found == Path); (void)Found; - return Context.Sources.createFileID(File, SourceLocation(), SrcMgr::C_User); + return Context.Sources.createFileID(*File, SourceLocation(), + SrcMgr::C_User); } std::string getFileContentFromDisk(llvm::StringRef Name) { |