aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2025-07-31 09:57:13 -0400
committerGitHub <noreply@github.com>2025-07-31 09:57:13 -0400
commit9ddbb478ce11e43ae18aa6d04937a51621021482 (patch)
tree5f5462a6ff5f890d968c2aff79673fb8c62c169b /clang/unittests/Tooling/CompilationDatabaseTest.cpp
parent920d5bbf0d3fff3bc0953957b896055ea653628c (diff)
downloadllvm-9ddbb478ce11e43ae18aa6d04937a51621021482.zip
llvm-9ddbb478ce11e43ae18aa6d04937a51621021482.tar.gz
llvm-9ddbb478ce11e43ae18aa6d04937a51621021482.tar.bz2
NFC: Clean up construction of IntrusiveRefCntPtr from raw pointers for llvm::vfs::FileSystem. (#151407)
This switches to `makeIntrusiveRefCnt<FileSystem>` where creating a new object, and to passing/returning by `IntrusiveRefCntPtr<FileSystem>` instead of `FileSystem*` or `FileSystem&`, when dealing with existing objects. Part of cleanup #151026.
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
-rw-r--r--clang/unittests/Tooling/CompilationDatabaseTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
index c1febaf..2d68e09 100644
--- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -971,7 +971,8 @@ TEST_F(TargetAndModeTest, TargetAndMode) {
class ExpandResponseFilesTest : public MemDBTest {
public:
- ExpandResponseFilesTest() : FS(new llvm::vfs::InMemoryFileSystem) {}
+ ExpandResponseFilesTest()
+ : FS(llvm::makeIntrusiveRefCnt<llvm::vfs::InMemoryFileSystem>()) {}
protected:
void addFile(StringRef File, StringRef Content) {