[PATCH] D54769: [FileCheck] New option -warn

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 10:17:53 PST 2018


dblaikie added a comment.

In D54769#1316992 <https://reviews.llvm.org/D54769#1316992>, @jdenny wrote:

> Conclusion: A distinct general syntax for FileCheck directives would permit us to implement //precise// detection of //all// unused directives and thus more cleanly combat directive typos.  There's plenty to be discussed, and the migration to a new syntax would be a long-term investment (but it can be done incrementally).  If the problem with typos is as bad as evidence seems to suggest so far,


What's the evidence that suggests typos are a cause of a significant cost to the project? I see them come up from time to time, but something on the sub 1% of test cases/false negatives, I'd have thought, if I had to guess.

> perhaps all that effort will prove worthwhile: it tackles the root of our problem rather than placing awkward band-aids over it as we're trying to do now.  What do people think?

How would having a fixed prefix (like the FC example given) help diagnose misspelled directives in one FileCheck run, when another FileCheck run on the same file may use different check prefixes? (usually named prefixes are used for this situation, where a single file contains checks for multiple different things (different tests/using different flags, or multiple tests using different tools (compile this file, then run dwarfdump & FileCheck that output, then run objdump and FileCheck that output with a different prefix))? The file contains, say, a collection of checks with two different prefixes (DWARF: and OBJ:, for instance) - and each FileCheck run is run with only one of those prefixes, so all the others would look like typos, right? (even if they were prefixed with "FC-")


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54769/new/

https://reviews.llvm.org/D54769





More information about the llvm-commits mailing list