summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibTooling.rst
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-30 09:29:34 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-30 09:29:34 +0000
commitb22804b35464049ca92107d45042d2a5bbd292f6 (patch)
tree4e29b283156209efc4945de2129c9f8ad878d28f /clang/docs/LibTooling.rst
parent12a7e6c09cda7fd0259be85c949cf87b040bf1b7 (diff)
downloadbcm5719-llvm-b22804b35464049ca92107d45042d2a5bbd292f6.tar.gz
bcm5719-llvm-b22804b35464049ca92107d45042d2a5bbd292f6.zip
[Tooling] Migrated APIs that take ownership of objects to unique_ptr
Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66960 llvm-svn: 370451
Diffstat (limited to 'clang/docs/LibTooling.rst')
-rw-r--r--clang/docs/LibTooling.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/docs/LibTooling.rst b/clang/docs/LibTooling.rst
index 2aaa508a136..202afc0887e 100644
--- a/clang/docs/LibTooling.rst
+++ b/clang/docs/LibTooling.rst
@@ -34,7 +34,7 @@ looked for. Let me give you an example:
TEST(runToolOnCode, CanSyntaxCheckCode) {
// runToolOnCode returns whether the action was correctly run over the
// given code.
- EXPECT_TRUE(runToolOnCode(new clang::SyntaxOnlyAction, "class X {};"));
+ EXPECT_TRUE(runToolOnCode(std::make_unique<clang::SyntaxOnlyAction>(), "class X {};"));
}
Writing a standalone tool
OpenPOWER on IntegriCloud