diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-05-10 23:56:43 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-05-10 23:56:43 +0000 |
commit | 3fddae75c72705d69e7eca26fb2e37cf7c06b6ca (patch) | |
tree | 4755c2c0e4ce8285d6d1542f95e36d10fe5eb52b /clang/tools/c-index-test/c-index-test.c | |
parent | ef316ee8dffad83d86b0f7f5383ad33c6ab06dbb (diff) | |
download | llvm-3fddae75c72705d69e7eca26fb2e37cf7c06b6ca.zip llvm-3fddae75c72705d69e7eca26fb2e37cf7c06b6ca.tar.gz llvm-3fddae75c72705d69e7eca26fb2e37cf7c06b6ca.tar.bz2 |
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).
llvm-svn: 208483
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index fd2b120..99f291d 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -977,7 +977,6 @@ void PrintDiagnostic(CXDiagnostic Diagnostic) { PrintExtent(out, start_line, start_column, end_line, end_column); fprintf(out, " with \"%s\"\n", clang_getCString(insertion_text)); } - break; } clang_disposeString(insertion_text); } |