This adds new option -warn to FileCheck. We would like FileCheck to
produce diagnostics indicating possible test case issues when this
options is enabled. The motiving example taken from D53710 is this:
RUN: llc -mtriple=arm-linux-gnueabi %s -o - | FileCheck %s -check-prefix=FOO define void @FOO() { entry: ; FOO-LABEL: FOO: ; ZOO: mov pc, lr ret void }
The problem here is that we're not really checking anything, because
non-LABEL prefix "DOO" isn't checked with -check-prefix: FOO is, but
ZOO isn't, which can easily happen when a typo is made.
This is the initial bit of plumbing to add a new option, under which
we can later emit diagnostics.
Is the purpose of this warning purely for testing your -warn implementation? That is, do you plan to remove it upon committing D53710 (or some other warning)?
I'm imagining grepping through test suite output looking for FileCheck warnings to investigate, and this warning would be a pervasive distraction.