llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Danial Klimkin (dklimkin) <details> <summary>Changes</summary> AddressSanitizer: 56 byte(s) leaked in 1 allocation(s). (clang/unittests:lex_tests) --- Full diff: https://github.com/llvm/llvm-project/pull/95927.diff 1 Files Affected: - (modified) clang/unittests/Lex/HeaderSearchTest.cpp (+4-2) ``````````diff diff --git a/clang/unittests/Lex/HeaderSearchTest.cpp b/clang/unittests/Lex/HeaderSearchTest.cpp index 38ce3812c204f..b0375d5985f2e 100644 --- a/clang/unittests/Lex/HeaderSearchTest.cpp +++ b/clang/unittests/Lex/HeaderSearchTest.cpp @@ -19,6 +19,8 @@ #include "clang/Serialization/InMemoryModuleCache.h" #include "llvm/Support/MemoryBuffer.h" #include "gtest/gtest.h" +#include <memory> +#include <string> namespace clang { namespace { @@ -350,8 +352,8 @@ TEST_F(HeaderSearchTest, HeaderFileInfoMerge) { std::string TextualPath = "/textual.h"; }; - auto ExternalSource = new MockExternalHeaderFileInfoSource(); - Search.SetExternalSource(ExternalSource); + auto ExternalSource = std::make_unique<MockExternalHeaderFileInfoSource>(); + Search.SetExternalSource(ExternalSource.get()); // Everything should start out external. auto ModularFE = AddHeader(ExternalSource->ModularPath); `````````` </details> https://github.com/llvm/llvm-project/pull/95927 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits