r208483 - Don't leak CXStrings for replacement fix-its in c-index-test.
Nico Weber
nicolasweber at gmx.de
Sat May 10 16:56:43 PDT 2014
Author: nico
Date: Sat May 10 18:56:43 2014
New Revision: 208483
URL: http://llvm.org/viewvc/llvm-project?rev=208483&view=rev
Log:
Don't leak CXStrings for replacement fix-its in c-index-test.
The loop body used to contain a switch statement; it looks like r96685 replaced
that with an if/else if/else but accidentally left one of the three break
statements from the switch behind, skipping the clang_disposeString() call
for replacements (and the rest of the loop too, which apparently doesn't make
a differences for the test cases we have).
r96685: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100215/027754.html
This too might possibly the last leak in clang (PR19521).
Modified:
cfe/trunk/tools/c-index-test/c-index-test.c
Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=208483&r1=208482&r2=208483&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Sat May 10 18:56:43 2014
@@ -977,7 +977,6 @@ void PrintDiagnostic(CXDiagnostic Diagno
PrintExtent(out, start_line, start_column, end_line, end_column);
fprintf(out, " with \"%s\"\n", clang_getCString(insertion_text));
}
- break;
}
clang_disposeString(insertion_text);
}
More information about the cfe-commits
mailing list