diff options
author | Eric Liu <ioeric@google.com> | 2016-08-01 10:16:39 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2016-08-01 10:16:39 +0000 |
commit | 7f9e09df357fecc8168a89d4439c30b843efb1e1 (patch) | |
tree | 5a8faf6ce16bcc859e7e242a24f3a81e59524d69 /tool-template | |
parent | 7af9b2cb886a0c9fd27020c64cb820541a7658c7 (diff) |
Changes related to new implementation of tooling::Replacements as class.
Summary: See http://reviews.llvm.org/D21748 for details.
Reviewers: djasper, klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D21749
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@277336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tool-template')
-rw-r--r-- | tool-template/ToolTemplate.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tool-template/ToolTemplate.cpp b/tool-template/ToolTemplate.cpp index 020f1fd6..54b4a696 100644 --- a/tool-template/ToolTemplate.cpp +++ b/tool-template/ToolTemplate.cpp @@ -53,18 +53,20 @@ using namespace llvm; namespace { class ToolTemplateCallback : public MatchFinder::MatchCallback { - public: - ToolTemplateCallback(Replacements *Replace) : Replace(Replace) {} +public: + ToolTemplateCallback(std::map<std::string, Replacements> *Replace) + : Replace(Replace) {} void run(const MatchFinder::MatchResult &Result) override { - // TODO: This routine will get called for each thing that the matchers find. + // TODO: This routine will get called for each thing that the matchers + // find. // At this point, you can examine the match, and do whatever you want, // including replacing the matched text with other text (void)Replace; // This to prevent an "unused member variable" warning; } - private: - Replacements *Replace; +private: + std::map<std::string, Replacements> *Replace; }; } // end anonymous namespace |