diff options
Diffstat (limited to 'clang/unittests/AST/ASTImporterTest.cpp')
-rw-r--r-- | clang/unittests/AST/ASTImporterTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index c0fb642..ac38300 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -6976,7 +6976,8 @@ TEST_P(LLDBLookupTest, ImporterShouldFindInTransparentContext) { // Set up DeclContextBits.HasLazyExternalLexicalLookups to true. ToTU->setMustBuildLookupTable(); struct TestExternalASTSource : ExternalASTSource {}; - ToTU->getASTContext().setExternalSource(new TestExternalASTSource()); + ToTU->getASTContext().setExternalSource( + llvm::makeIntrusiveRefCnt<TestExternalASTSource>()); Decl *FromTU = getTuDecl( R"( @@ -8154,8 +8155,8 @@ TEST_P(ImportWithExternalSource, CompleteRecordBeforeImporting) { // Create and add the test ExternalASTSource. std::vector<clang::TagDecl *> CompletedTags; - IntrusiveRefCntPtr<ExternalASTSource> source = - new SourceWithCompletedTagList(CompletedTags); + auto source = + llvm::makeIntrusiveRefCnt<SourceWithCompletedTagList>(CompletedTags); clang::ASTContext &Context = FromTU->getASTContext(); Context.setExternalSource(std::move(source)); |