<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 16, 2013 at 3:51 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">Sean, John,<br>
<div class="im"><br>
On Fri, Oct 18, 2013 at 2:12 AM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
><br>
> Turning the preprocessor decisions into a serialized textual format is a great idea!<br>
><br>
> Though this seems like it would be better done as an independent tool. I.e. one that reads its file on stdin (or as an argument) and prints out this information, for use in conjunction with FileCheck. That would allow idiomatic LLVM FileCheck testing similar to:<br>
><br>
> ; RUN: opt < %s -sroa -S | FileCheck %s<br>
><br>
> (that was from `llvm/test/Transforms/SROA/basictest.ll` but there are innumerable other examples).<br>
><br>
> so the usage would be something like:<br>
><br>
> ; RUN: pp-trace < %s | FileCheck %s<br>
><br>
> That would also completely offload the burden of the pattern matching/specification to FileCheck, and integrate with developers' existing familiarity with FileCheck.<br>
<br>
</div>I've already used pp-trace to great effect for learning more about<br>
PPCallbacks sequences when parsing code.<br></blockquote><div><br></div><div>Credit is all John's for the great idea! In general, observability into what is happening is always highly enlightening.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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></blockquote><div><br></div><div>If it would be useful for writing test in clang/, then I think it makes sense to move it. Why don't you try emailing cfe-dev with some example tests you would like to add? </div>
<div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
- Kim<br>
</font></span></blockquote></div><br></div></div>