summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Tooling/Tooling.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Tooling/Tooling.h')
-rw-r--r--clang/include/clang/Tooling/Tooling.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/include/clang/Tooling/Tooling.h b/clang/include/clang/Tooling/Tooling.h
index 46c988b7e70..ece38fc7e74 100644
--- a/clang/include/clang/Tooling/Tooling.h
+++ b/clang/include/clang/Tooling/Tooling.h
@@ -161,8 +161,8 @@ bool runToolOnCodeWithArgs(clang::FrontendAction *ToolAction, const Twine &Code,
/// \param FileName The file name which 'Code' will be mapped as.
///
/// \return The resulting AST or null if an error occurred.
-ASTUnit *buildASTFromCode(const Twine &Code,
- const Twine &FileName = "input.cc");
+std::unique_ptr<ASTUnit> buildASTFromCode(const Twine &Code,
+ const Twine &FileName = "input.cc");
/// \brief Builds an AST for 'Code' with additional flags.
///
@@ -171,9 +171,10 @@ ASTUnit *buildASTFromCode(const Twine &Code,
/// \param FileName The file name which 'Code' will be mapped as.
///
/// \return The resulting AST or null if an error occurred.
-ASTUnit *buildASTFromCodeWithArgs(const Twine &Code,
- const std::vector<std::string> &Args,
- const Twine &FileName = "input.cc");
+std::unique_ptr<ASTUnit>
+buildASTFromCodeWithArgs(const Twine &Code,
+ const std::vector<std::string> &Args,
+ const Twine &FileName = "input.cc");
/// \brief Utility to run a FrontendAction in a single clang invocation.
class ToolInvocation {
OpenPOWER on IntegriCloud