This is an archive of the discontinued LLVM Phabricator instance.

Test all CHECK-NOT in a block even if one fails
ClosedPublic

Authored by thopre on Aug 20 2020, 1:12 PM.

Details

Summary

This commit makes FileCheck print all CHECK-NOT directive failure in a
CHECK-NOT block even if one fails. Prior to that, it would stop trying
to match CHECK-NOT directive as soon as one in the block fails.

Diff Detail

Event Timeline

thopre created this revision.Aug 20 2020, 1:12 PM
thopre requested review of this revision.Aug 20 2020, 1:12 PM
thopre updated this revision to Diff 287245.Aug 23 2020, 2:37 AM

Add testcase

jhenderson added inline comments.Aug 24 2020, 12:30 AM
llvm/test/FileCheck/multiple-check-not-failures.txt
3
5–6

I prefer this style - it means each line clearly indicates the continuation pattern individually, whilst also showing that the entire command is present in the first line (which the existing style doesn't).

32

I think this line is a little too precise for a -NOT pattern - a slight change to the message would result in the check no longer doing anything useful.

You could probably just get away with something like CHECK-ERRORS-NOT: error:

thopre updated this revision to Diff 287324.Aug 24 2020, 3:16 AM
thopre marked 3 inline comments as done.

Address review comments

llvm/test/FileCheck/multiple-check-not-failures.txt
32

I had to disable --dump-input for that because otherwise it shows the error again and the CHECK-NOT fails.

This revision is now accepted and ready to land.Aug 24 2020, 3:32 AM
thopre updated this revision to Diff 287372.Aug 24 2020, 6:33 AM

Rebase to see if CI is now green.

This revision was automatically updated to reflect the committed changes.