forked from OSchip/llvm-project
Fix leak introduced in r194610, found by LSan.
LSan folks: LSan pointed to #0 0x4953e0 in operator new[](unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:64 #1 0x7fb82af5372f in clang::RewriteRope::MakeRopeString(char const*, char const*) llvm/tools/clang/lib/Rewrite/Core/RewriteRope.cpp:796 instead of to the actual leak, which made tracking this down slower than it could have been. llvm-svn: 207031
This commit is contained in:
parent
9e6a524551
commit
795f6a9d7c
|
@ -29,6 +29,7 @@ class CommentToXMLConverter {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CommentToXMLConverter() : FormatContext(0), FormatInMemoryUniqueId(0) {}
|
CommentToXMLConverter() : FormatContext(0), FormatInMemoryUniqueId(0) {}
|
||||||
|
~CommentToXMLConverter();
|
||||||
|
|
||||||
void convertCommentToHTML(const comments::FullComment *FC,
|
void convertCommentToHTML(const comments::FullComment *FC,
|
||||||
SmallVectorImpl<char> &HTML,
|
SmallVectorImpl<char> &HTML,
|
||||||
|
|
|
@ -1136,6 +1136,10 @@ void CommentASTToXMLConverter::appendToResultWithCDATAEscaping(StringRef S) {
|
||||||
Result << "]]>";
|
Result << "]]>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommentToXMLConverter::~CommentToXMLConverter() {
|
||||||
|
delete FormatContext;
|
||||||
|
}
|
||||||
|
|
||||||
void CommentToXMLConverter::convertCommentToHTML(const FullComment *FC,
|
void CommentToXMLConverter::convertCommentToHTML(const FullComment *FC,
|
||||||
SmallVectorImpl<char> &HTML,
|
SmallVectorImpl<char> &HTML,
|
||||||
const ASTContext &Context) {
|
const ASTContext &Context) {
|
||||||
|
|
Loading…
Reference in New Issue