I would like FileCheck to warn for cases like this:
RUN: llc -mtriple=arm-linux-gnueabi %s -o - | FileCheck %s -check-prefix=FOO define void @FOO() { entry: ; FOO-LABEL: FOO: ; DOO: mov pc, lr ret void }
Here, prefix FOO is only used in a label check FOO-LABEL. This can easily
happen when a typo is made in the actual checks: here accidentally DOO is
checked instead of FOO. The problem is that this goes unnoticed, as
FileCheck is not producing a diagnostic for this.
I would like to change this behaviour, and with this patch FileCheck will now
warn like this:
foo.ll:5:18: note: Prefix FOO only occurs in a LABEL check, this is probably not what you want ; FOO-LABEL: FOO: ^
Notes usually follow other diagnostics. Shouldn't this be a warning?