<pedantic><div class="gmail_extra"><br>On Thu, Aug 16, 2012 at 10:47 AM, Marshall Clow <span dir="ltr"><<a href="mailto:mclow@qualcomm.com" target="_blank" class="cremed">mclow@qualcomm.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">--- clang-tools-extra/trunk/tool-template/ToolTemplate.cpp (original)<br>
+++ clang-tools-extra/trunk/tool-template/ToolTemplate.cpp Thu Aug 16 12:47:06 2012<br>
@@ -1,4 +1,4 @@<br>
-//===- tools/extra/RefactoringTemplate.cpp - Template for refactoring tool ===//<br>
+//===- tools/extra/ToolTemplate.cpp - Template for refactoring tool ===//<br></blockquote><div><br></div><div>This is no longer justified to 80-columns. ;]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -11,7 +11,7 @@<br>
 //  The goal is to lower the "barrier to entry" for writing refactoring tools.<br>
 //<br>
 //  Usage:<br>
-//  refactoringTemplate <cmake-output-dir> <file1> <file2> ...<br>
+//  tool-template <cmake-output-dir> <file1> <file2> ...<br>
 //<br>
 //  Where <cmake-output-dir> is a CMake build directory in which a file named<br>
 //  compile_commands.json exists (enable -DCMAKE_EXPORT_COMPILE_COMMANDS in<br>
@@ -26,11 +26,11 @@<br>
 //  removed, but the rest of a relative path must be a suffix of a path in<br>
 //  the compile command line database.<br>
 //<br>
-//  For example, to use refactoringTemplate on all files in a subtree of the<br>
+//  For example, to use tool-template on all files in a subtree of the<br>
 //  source tree, use:<br>
 //<br>
 //    /path/in/subtree $ find . -name '*.cpp'|<br>
-//        xargs refactoringTemplate /path/to/build<br>
+//        xargs tool-template /path/to/build<br>
 //<br>
 //===----------------------------------------------------------------------===//<br>
<br>
@@ -52,14 +52,15 @@<br>
 using namespace llvm;<br>
<br>
 namespace {<br>
-class TemplateCallback : public MatchFinder::MatchCallback {<br>
+class ToolTemplateCallback : public MatchFinder::MatchCallback {<br>
  public:<br>
-  TemplateCallback(Replacements *Replace) : Replace(Replace) {}<br>
+  ToolTemplateCallback(Replacements *Replace) : Replace(Replace) {}<br>
<br>
   virtual void run(const MatchFinder::MatchResult &Result) {<br>
 //  TODO: This routine will get called for each thing that the matchers find.<br>
 //  At this point, you can examine the match, and do whatever you want,<br>
 //  including replacing the matched text with other text<br>
+  (void) Replace; // This to prevent an "unused member variable" warning;<br>
   }<br>
<br>
  private:<br>
@@ -95,7 +96,7 @@<br>
     }<br>
   RefactoringTool Tool(*Compilations, SourcePaths);<br>
   ast_matchers::MatchFinder Finder;<br>
-  TemplateCallback Callback(&Tool.getReplacements());<br>
+  ToolTemplateCallback Callback(&Tool.getReplacements());<br>
<br>
 // TODO: Put your matchers here.<br>
 // Use Finder.addMatcher(...) to define the patterns in the AST that you<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" class="cremed">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>