summaryrefslogtreecommitdiffstats
path: root/pp-trace
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-10 19:56:59 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-10 19:56:59 +0000
commite6b86480972932d6860c241a9c04f841ecd6a7a7 (patch)
tree066ea63f557106e3cd1d21402eca2cc06ca3fb01 /pp-trace
parent95cee0d1437dd9e29faf56dfbb2c3d65cd109a22 (diff)
Recommit 213308: unique_ptr-ify ownership of ASTConsumers (reverted in r213324)
After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'pp-trace')
-rw-r--r--pp-trace/PPTrace.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/pp-trace/PPTrace.cpp b/pp-trace/PPTrace.cpp
index 4cf55c76..cb0aefae 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: