diff options
| author | Alexander Kornienko <alexfh@google.com> | 2014-11-17 23:46:02 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2014-11-17 23:46:02 +0000 |
| commit | 41c247a677f0dafaa13fc05a028275334d5df779 (patch) | |
| tree | ed924630113ca0750c462364131a85f1894d8bdf /clang/unittests/Sema | |
| parent | d60b82f93eee090650d848c45f34dcf9d3ffa0ea (diff) | |
| download | bcm5719-llvm-41c247a677f0dafaa13fc05a028275334d5df779.tar.gz bcm5719-llvm-41c247a677f0dafaa13fc05a028275334d5df779.zip | |
Make DiagnosticsEngine::takeClient return std::unique_ptr<>
Summary:
Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated
callers to store conditional ownership using a pair of pointer and unique_ptr
instead of a pointer + bool. Updated code that temporarily registers clients to
use the non-owning registration (+ removed extra calls to takeClient).
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6294
llvm-svn: 222193
Diffstat (limited to 'clang/unittests/Sema')
| -rw-r--r-- | clang/unittests/Sema/ExternalSemaSourceTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Sema/ExternalSemaSourceTest.cpp b/clang/unittests/Sema/ExternalSemaSourceTest.cpp index 4291b76e7d4..3a93fc77fb1 100644 --- a/clang/unittests/Sema/ExternalSemaSourceTest.cpp +++ b/clang/unittests/Sema/ExternalSemaSourceTest.cpp @@ -154,7 +154,7 @@ protected: DiagnosticsEngine &Diagnostics = CI.getDiagnostics(); DiagnosticConsumer *Client = Diagnostics.getClient(); if (Diagnostics.ownsClient()) - OwnedClient.reset(Diagnostics.takeClient()); + OwnedClient = Diagnostics.takeClient(); for (size_t I = 0, E = Watchers.size(); I < E; ++I) Client = Watchers[I]->Chain(Client); Diagnostics.setClient(Client, false); |

