This is an archive of the discontinued LLVM Phabricator instance.

[NFC][FileCheck] Add --allow-unused-prefixes option
AbandonedPublic

Authored by mtrofin on Oct 28 2020, 12:26 PM.

Details

Summary

This introduces the option and plumbs it through, but does not leverage
it just yet.

The background is: FileCheck only checks that one prefix is used, so if
more are specified, some may never be exercised. This may be intentional
or accidental. We want to catch the latter. Currently there are ~1500
tests exhibiting this. The option allows tests to opt in to the behavior
(if that is intended), following which, we enable strict prefix checking
(D90281)

Diff Detail

Event Timeline

mtrofin created this revision.Oct 28 2020, 12:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2020, 12:26 PM
mtrofin requested review of this revision.Oct 28 2020, 12:26 PM

Emm... I think you can just reuse D90281 as we want the option to come with its functionality to test that the option is actually useful.

llvm/utils/FileCheck/FileCheck.cpp
80

true by default then switch to false by default

mtrofin abandoned this revision.Oct 28 2020, 1:22 PM

Merged with D90281