summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-29 08:14:50 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-29 08:14:50 +0000
commit6e210232abd4e103e8d3c1acab643c053b7380e8 (patch)
tree80edc6a12c7218bcb5be66114b249899c140bdff /clang/tools/libclang/Indexing.cpp
parent1d63ae3731f6aedbe19c3dfed538e1460be3dfdc (diff)
downloadbcm5719-llvm-6e210232abd4e103e8d3c1acab643c053b7380e8.tar.gz
bcm5719-llvm-6e210232abd4e103e8d3c1acab643c053b7380e8.zip
[libclang] Fix leak in clang_indexSourceFile_Impl
llvm-svn: 145393
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r--clang/tools/libclang/Indexing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index 222e301d46e..5950455104e 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -252,7 +252,8 @@ static void clang_indexSourceFile_Impl(void *UserData) {
Diags(CompilerInstance::createDiagnostics(DiagOpts, num_command_line_args,
command_line_args,
CaptureDiag,
- /*ShouldOwnClient=*/true));
+ /*ShouldOwnClient=*/true,
+ /*ShouldCloneClient=*/false));
// Recover resources if we crash before exiting this function.
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
OpenPOWER on IntegriCloud