On Sat, Nov 16, 2013 at 3:51 AM, Kim Gräsman <[email protected]> wrote:
> Sean, John, > > On Fri, Oct 18, 2013 at 2:12 AM, Sean Silva <[email protected]> wrote: > > > > Turning the preprocessor decisions into a serialized textual format is > a great idea! > > > > 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: > > > > ; RUN: opt < %s -sroa -S | FileCheck %s > > > > (that was from `llvm/test/Transforms/SROA/basictest.ll` but there are > innumerable other examples). > > > > so the usage would be something like: > > > > ; RUN: pp-trace < %s | FileCheck %s > > > > That would also completely offload the burden of the pattern > matching/specification to FileCheck, and integrate with developers' > existing familiarity with FileCheck. > > I've already used pp-trace to great effect for learning more about > PPCallbacks sequences when parsing code. > Credit is all John's for the great idea! In general, observability into what is happening is always highly enlightening. > > It'll be difficult to use pp-trace for these tests, though, as it's in > clang-tools-extra. Was there a plan to get it into clang/tools? > 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? -- Sean Silva > > - Kim >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
