-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Soften error #421
Soften error #421
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reorganization of insertNewFVConstraint
looks nice. A definite improvement over the old code.
While I was working on #412, I noticed that the existing tests of the declaration merging errors ( |
@mattmccutchen-cci Yeah, I'll update these. Thanks for the test refs, I thought XFAIL meant expected fail? There's also |
XFAIL means that the test is expected to fail because it asserts that the program has the intended behavior, but the actual behavior does not match the intended behavior due to a known bug. Our scenario here is different: we are testing 3C's error reporting functionality, so a 3C failure (nonzero exit) is actually the intended behavior. People may be confused if we use XFAIL in this scenario. Also, XFAIL has a major practical limitation that it will "pass" if any step fails, so there isn't a good way to test that the "failure" is precisely the declaration merging error message you expect and not some unrelated problem. (In principle, the same argument applies to a test of a known bug: ideally, we should check that the actual behavior reflects the known bug and not some other problem. But lit currently doesn't have a good way to do this, and I don't think it's worth worrying about now.)
Here is the reference on Clang's built-in diagnostic verifier (which I linked to from 3CStandalone.cpp). While the diagnostic verifier uses similar comments as FileCheck, it does not actually use FileCheck; they are separate tools. That said, I don't think we can use the diagnostic verifier in this scenario because it normally exits 0 or 1 depending on whether the diagnostics were as expected, but here you are exiting 1 before the verifier has a chance to verify anything. We might be able to add more code to allow the verifier to work; I don't think it's worthwhile now, though it may be worth considering in the future if we add more immediate-exit errors to 3C. Given all that, if you have a better idea than the |
Since there's a testing refactor (#412) nearly complete, I'll defer until that merges to add the test files. Then we can use the code suggested a few comments up and create a similar one for the error reported here. |
Switched to #432 with a new branch on correctcomputation. |
Fix for issue #414. I added a failue reason to braintransplant and changed some of those asserts into diagnostic failures.
I also refactored insertNewFVConstraint for clarity.
I need to add a couple tests, including failure cases, but people expressed interest in this PR as soon as the code was ready.