]> granicus.if.org Git - clang/commit
Fix memory leak exposed by r304726.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 5 Jun 2017 22:05:31 +0000 (22:05 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 5 Jun 2017 22:05:31 +0000 (22:05 +0000)
commita38ba9770a70056f9fdd6c71f819e5db45a105e4
treeaccd8980fd0aedf0446fa8c26b4a5dd0cd599f07
parent747fcbb8908f48825386c6c9eb8fb2fd4bf9444d
Fix memory leak exposed by r304726.

When giving a ContentCache a null buffer, ignore the DoNotFree flag rather than
inheriting it onto whatever buffer we end up using for the file. Also ensure
that the main buffer is properly destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304740 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/SourceManager.cpp