Fixed memory leak in unit test introduced in my previous commit r322503

llvm-svn: 322513
This commit is contained in:
Cameron Desrochers 2018-01-15 20:37:35 +00:00
parent 1393ccf949
commit 3d24630c7b
1 changed files with 3 additions and 0 deletions

View File

@ -592,6 +592,9 @@ TEST_F(LibclangReparseTest, PreprocessorSkippedRanges) {
if (i == 2)
flags |= CXTranslationUnit_CreatePreambleOnFirstParse;
if (i != 0)
clang_disposeTranslationUnit(ClangTU); // dispose from previous iter
// parse once
ClangTU = clang_parseTranslationUnit(Index, Main.c_str(), nullptr, 0,
nullptr, 0, flags);