Page MenuHomePhabricator

[FileCheck] Implement -dump-input-filter
ClosedPublic

Authored by jdenny on Jul 2 2020, 2:26 PM.

Details

Summary

This makes the input dump filtering implemented by D82203 more
configurable. D82203 enables filtering out everything but the initial
input lines of error diagnostics (plus some context). This patch
enables including any line with any kind of annotation.

Diff Detail

Event Timeline

jdenny created this revision.Jul 2 2020, 2:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2020, 2:26 PM
mehdi_amini accepted this revision.Jul 9 2020, 8:30 PM
mehdi_amini added inline comments.
llvm/utils/FileCheck/FileCheck.cpp
455

In a tool like FileCheck I rather err on the side of deterministically failing with a report_fatal_error

This revision is now accepted and ready to land.Jul 9 2020, 8:30 PM
jdenny marked an inline comment as done.Jul 10 2020, 4:39 AM
jdenny added inline comments.
llvm/utils/FileCheck/FileCheck.cpp
455

I don't object in principal, but I see no precedent for this in FileCheck.

Are you ok with this landing as is? If FileCheck should generally use report_fatal_error instead of llvm_unreachable, I feel like that should be discussed in a separate review for all occurrences.

This revision was automatically updated to reflect the committed changes.
jdenny marked an inline comment as done.Jul 10 2020, 8:05 AM
jdenny added inline comments.
llvm/utils/FileCheck/FileCheck.cpp
455

Given your accept and the tone of your comment, I decided it's safe to land this as is. I'm fine to revert or adjust if you feel this was the wrong decision. And again, I'm open to a larger discussion about making this change throughout FileCheck.

mehdi_amini added inline comments.Jul 10 2020, 9:06 PM
llvm/utils/FileCheck/FileCheck.cpp
455

LG

I don't think it has bitten anyone, so likely not worth the effort right now.