summaryrefslogtreecommitdiff
path: root/lib/Tooling/CompilationDatabase.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-05-09 22:33:11 +0000
committerNico Weber <nicolasweber@gmx.de>2014-05-09 22:33:11 +0000
commit3748941f2ea43eb81a4a8edf02abf7f83881fa89 (patch)
tree4a95b3d5e2c5edde8a3bc9391dc5b0e69701f0ae /lib/Tooling/CompilationDatabase.cpp
parentb8e405f9f3e00d9385239b0399b90b84d969e1e3 (diff)
downloadclang-3748941f2ea43eb81a4a8edf02abf7f83881fa89.tar.gz
clang-3748941f2ea43eb81a4a8edf02abf7f83881fa89.tar.bz2
clang-3748941f2ea43eb81a4a8edf02abf7f83881fa89.tar.xz
Don't leak the CXStoredDiagnostics returned by clang_codeCompleteGetDiagnostic()
r144269 changed clang_disposeDiagnostic() to be a no-op, but didn't update code completion diagnostics. Let CXCodeCompleteResults store all diagnostics returned by clang_codeCompleteGetDiagnostic() and then free them up in clang_disposeCodeCompleteResults(). Code completion diagnostics referred to data stored in CXCodeCompleteResults before already, so it wasn't possible to refer to the results of clang_codeCompleteGetDiagnostic() after clang_disposeCodeCompleteResults() before this change already -- hence this should be a safe, backwards-compatible change. Leak found by LSan, fixes PR19690. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
0 files changed, 0 insertions, 0 deletions