summaryrefslogtreecommitdiffstats
path: root/clang/examples
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-01-06 19:49:01 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-01-06 19:49:01 +0000
commitea4395ebcd37905487b7a978db2f460bc576a5d1 (patch)
tree92303c3c362a7eee408868cfa554f15683b0c02d /clang/examples
parent9cbcc5ff0b325ef2c0638e6c5c365b35a1e4f087 (diff)
downloadbcm5719-llvm-ea4395ebcd37905487b7a978db2f460bc576a5d1.tar.gz
bcm5719-llvm-ea4395ebcd37905487b7a978db2f460bc576a5d1.zip
Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer"
Aleksey Shlypanikov pointed out my mistake in migrating an explicit unique_ptr to auto - I was expecting the function returned a unique_ptr, but instead it returned a raw pointer - introducing a leak. Thanks Aleksey! This reapplies r291184, reverted in r291249. llvm-svn: 291270
Diffstat (limited to 'clang/examples')
-rw-r--r--clang/examples/clang-interpreter/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/examples/clang-interpreter/main.cpp b/clang/examples/clang-interpreter/main.cpp
index 9b4a257bcba..f7832291f2b 100644
--- a/clang/examples/clang-interpreter/main.cpp
+++ b/clang/examples/clang-interpreter/main.cpp
@@ -145,7 +145,7 @@ int main(int argc, const char **argv, char * const *envp) {
// Create a compiler instance to handle the actual work.
CompilerInstance Clang;
- Clang.setInvocation(CI.release());
+ Clang.setInvocation(std::move(CI));
// Create the compilers actual diagnostics engine.
Clang.createDiagnostics();
OpenPOWER on IntegriCloud