<div dir="ltr"><div>Yeah, Sean's too generous in giving away credit, the tool was his idea.</div><div> </div><div>What happened was that I needed a small change to the PPCallbacks conditional callbacks to give them the end result of the conditional expression, so I did that and checked it in.  Someone (I can't find the original comment, but I think it was Argyrios) commented that it would be nice if someone extended the unit test for PPCallbacks, as the current version only covered the include mechanism.  I said I would do it shortly, but wanting to finish my modularize work, it turned out to take a while before I got to it.  I extented the original test, but with just the framework and a couple of initial tests, then Sean suggested making it a tool and using FileCheck for the PPCallback tests.  Actually, the thought did occur to me to do it this way originally (but without YAML), but I didn't think writing a new executable for the test would fly with the community, so I went for enhancing the orginal test.  I can't say I was happy to throw away that work, but when Sean suggested the new direction, I was happy to do something that might be useful for someone for other purposes.  I pushed back a bit about the YAML, but I'm glad I got to learn a little about it, and from a first cut I discarded, about the YAML I/O library as well.</div>
<div> </div><div>With respect to including pp-trace into clang/tools, I think the recent discussion about the "extra" build being separate probably pertains to that.  (If you didn't see it, search cfe-commits for the subject "Re: [llvm] r193350 - Reverting my r193344 checkin due to build breakage" for the discussion I inadvertantly and embarassingly kicked off with my error.)  I think it would be nice to have the "extra" tools in the main clang tree, but I don't really have any strong feelings either way, as it's not very hard to check it out and build it separately.  However, I do have a concern about people not knowing about these tools.  (I only learned about them when someone suggested to me using one or two of them.)  Some of the tools have documentation, but after a quick look on the clang website, I couldn't find it, so I think the clang docs could to be updated with a mention of them and links to more info.  I'm not sure how this should be, since the extra docs are in the separate extra tree.</div>
<div> </div><div>Regarding adding tests to clang/test that depend on pp-trace, I see your point that it would make sense to have tests for something in clang in the clang tree.  I suppose new tests for new stuff in PPCallbacks could just be added to the pp-trace tests.</div>
<div> </div><div>Note that while debugging the callback tests for pragmas, I noticed that there seems to be a number of pragmas not covered by PPCallbacks.  I should probably add a fixme comment to PPCallbacks.h.</div><div>
 </div><div>-John</div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 17, 2013 at 12:01 AM, Kim Gräsman <span dir="ltr"><<a href="mailto:kim.grasman@gmail.com" target="_blank">kim.grasman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sean,<br>
<div class="im"><br>
On Sun, Nov 17, 2013 at 8:55 AM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
>><br>
>> It'll be difficult to use pp-trace for these tests, though, as it's in<br>
>> clang-tools-extra. Was there a plan to get it into clang/tools?<br>
><br>
> If it would be useful for writing test in clang/, then I think it makes<br>
> sense to move it. Why don't you try emailing cfe-dev with some example tests<br>
> you would like to add?<br>
<br>
</div>I don't have any particular needs, but I thought John's original<br>
motivation (the core of this patch) was to add tests around some<br>
changes of his to PPCallbacks. He started out with unit tests, and<br>
then you suggested a FileCheck-compatible tool, pp-trace was born,<br>
everybody was happy, and maybe we lost track of the original problem?<br>
:-)<br>
<span class="HOEnZb"><font color="#888888"><br>
- Kim<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br>
</div>