[PATCH] D61005: [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 09:56:58 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL359468: [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected. (authored by ymandel, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D61005?vs=196227&id=197136#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61005/new/
https://reviews.llvm.org/D61005
Files:
cfe/trunk/lib/Tooling/Refactoring/Stencil.cpp
Index: cfe/trunk/lib/Tooling/Refactoring/Stencil.cpp
===================================================================
--- cfe/trunk/lib/Tooling/Refactoring/Stencil.cpp
+++ cfe/trunk/lib/Tooling/Refactoring/Stencil.cpp
@@ -16,6 +16,7 @@
#include "clang/Tooling/Refactoring/SourceCode.h"
#include "llvm/Support/Errc.h"
#include <atomic>
+#include <memory>
#include <string>
using namespace clang;
@@ -183,17 +184,17 @@
}
StencilPart stencil::text(StringRef Text) {
- return StencilPart(llvm::make_unique<RawText>(Text));
+ return StencilPart(std::make_shared<RawText>(Text));
}
StencilPart stencil::node(StringRef Id) {
- return StencilPart(llvm::make_unique<NodeRef>(Id, SemiAssociation::Inferred));
+ return StencilPart(std::make_shared<NodeRef>(Id, SemiAssociation::Inferred));
}
StencilPart stencil::sNode(StringRef Id) {
- return StencilPart(llvm::make_unique<NodeRef>(Id, SemiAssociation::Always));
+ return StencilPart(std::make_shared<NodeRef>(Id, SemiAssociation::Always));
}
StencilPart stencil::dPrint(StringRef Id) {
- return StencilPart(llvm::make_unique<DebugPrintNodeOp>(Id));
+ return StencilPart(std::make_shared<DebugPrintNodeOp>(Id));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61005.197136.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190429/a12bb920/attachment.bin>
More information about the cfe-commits
mailing list