diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-07-17 20:40:47 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-07-17 20:40:47 +0000 |
| commit | 78e938385a69964ed7e8e36841d1e490439b13ba (patch) | |
| tree | 21e17a50cc68bd81f267515649ce50bad4a4961b /pp-trace | |
| parent | 6336ae9cc2b12963146467c5cb776484377bbaa5 (diff) | |
unique_ptr-ify ownership of ASTConsumers
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@213308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'pp-trace')
| -rw-r--r-- | pp-trace/PPTrace.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pp-trace/PPTrace.cpp b/pp-trace/PPTrace.cpp index ed955fb6..9dc1bbbe 100644 --- a/pp-trace/PPTrace.cpp +++ b/pp-trace/PPTrace.cpp @@ -120,9 +120,10 @@ public: : Ignore(Ignore), CallbackCalls(CallbackCalls) {} protected: - virtual clang::ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) { - return new PPTraceConsumer(Ignore, CallbackCalls, CI.getPreprocessor()); + std::unique_ptr<clang::ASTConsumer> + CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { + return llvm::make_unique<PPTraceConsumer>(Ignore, CallbackCalls, + CI.getPreprocessor()); } private: |
