Skip to content

Commit 7f43120

Browse files
committed
[Serialization] Free memory in LoadSpecLazilyTest
Default Clang invocations set DisableFree = true, which causes ASAN to complain. Override it in tests that are not supposed to leak.
1 parent 2fae58e commit 7f43120

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/unittests/Serialization/LoadSpecLazilyTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ class LoadSpecLazilyTest : public ::testing::Test {
8282
Instance.setDiagnostics(Diags.get());
8383
Instance.setInvocation(Invocation);
8484
Instance.getFrontendOpts().OutputFile = CacheBMIPath;
85+
// Avoid memory leaks.
86+
Instance.getFrontendOpts().DisableFree = false;
8587
GenerateModuleInterfaceAction Action;
8688
EXPECT_TRUE(Instance.ExecuteAction(Action));
8789
EXPECT_FALSE(Diags->hasErrorOccurred());

0 commit comments

Comments
 (0)