<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">On Wed, Oct 31, 2012 at 12:10 PM, Vane, Edwin <span dir="ltr"><<a href="mailto:edwin.vane@intel.com" target="_blank">edwin.vane@intel.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Matthieu Monrocq [mailto:<a href="mailto:matthieu.monrocq@gmail.com">matthieu.monrocq@gmail.com</a>]<br>
Sent: Wednesday, October 31, 2012 2:17 PM<br>
To: <a href="mailto:reviews%2BD92%2Bpublic%2B254f3887f2e36b94@llvm-reviews.chandlerc.com">reviews+D92+public+254f3887f2e36b94@llvm-reviews.chandlerc.com</a><br>
Cc: <a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>; Vane, Edwin; Clang Dev List<br>
Subject: Re: [cfe-commits] [PATCH] Simplifying lit script for remove-cstr-calls<br>
<div class="im"><br>
<br>
On Wed, Oct 31, 2012 at 4:28 PM, Edwin Vane <<a href="mailto:edwin.vane@intel.com">edwin.vane@intel.com</a>> wrote:<br>
Hi chandlerc,<br>
<br>
Following the example from loop-convert tests, simplifying the remove-cstr-calls lit script.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D92" target="_blank">http://llvm-reviews.chandlerc.com/D92</a><br>
<br>
Files:<br>
test/remove-cstr-calls/basic.cpp<br>
<br>
Index: test/remove-cstr-calls/basic.cpp<br>
===================================================================<br>
--- test/remove-cstr-calls/basic.cpp<br>
+++ test/remove-cstr-calls/basic.cpp<br>
@@ -1,12 +1,7 @@<br>
-// RUN: rm -rf %t<br>
-// RUN: mkdir %t<br>
-// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\//g' > %t/compile_commands.json<br>
-// RUN: cp "%s" "%t/test.cpp"<br>
-// RUN: remove-cstr-calls "%t" "%t/test.cpp"<br>
-// RUN: cat "%t/test.cpp" | FileCheck %s<br>
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp<br>
+// RUN: remove-cstr-calls . %t.cpp --<br>
+// RUN: FileCheck -input-file=%t.cpp %s<br>
<br>
FileCheck can accept arguments on the standard input (and thus it's possible to pipe into it)<br>
<br>
Would it be simpler to have remove-cstr-calls emit output on the standard output and just pipe it into FileCheck ?<br>
<br>
</div>REV: The refactoring framework doesn't output to stdout but rewrites files in place. So it would definitely be less simple to add that feature to the refactoring tool.<br></blockquote><div><br></div><div>Yep. Rewriting a single file is actually just a narrow special case.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
-- Matthieu<br>
<br>
// REQUIRES: shell<br>
-// FIXME: implement a mode for refactoring tools that takes input from stdin<br>
-// and writes output to stdout for easier testing of tools.<br>
<br>
namespace std {<br>
template<typename T> class allocator {};<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>