-
Notifications
You must be signed in to change notification settings - Fork 274
Add source location to invalid_source_file_exceptiont #5837
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
Add source location to invalid_source_file_exceptiont #5837
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #5837 +/- ##
===========================================
- Coverage 77.80% 77.80% -0.01%
===========================================
Files 1567 1566 -1
Lines 179916 179941 +25
===========================================
+ Hits 139988 140007 +19
- Misses 39928 39934 +6
Continue to review full report at Codecov.
|
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.
That looks great to me, and is what we should have done when we first added the structured exceptions. Some nice code cleanups/refactoring along the way too.
6c368cc
to
8e72373
Compare
8e72373
to
0a6a600
Compare
6d2a0f0
to
8f50ea8
Compare
De-duplicate initialize_goto_model's code [blocks: #5837]
8f50ea8
to
00270a6
Compare
00270a6
to
e482a61
Compare
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.
Previously reviewed and approved with my Diffblue account, re-approving with my non-Diffblue account to keep the CODEOWNER review.
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.
Yes. I don't think this breaks any scripting.
e482a61
to
8bd17d9
Compare
None of our existing tests covers the failure paths of type checking saturating arithmetic and character literal conversion, respectively.
This enables proper use in the C front-end in a way that is compatible with the compiler-specific message handlers in goto-cc: those message handlers generate source-location output that mimics that of the compiler being emulated. As future work it is thus possible to remove all "throw 0" instances from the C front-end.
8bd17d9
to
0470384
Compare
@@ -37,5 +38,11 @@ bool typecheckt::typecheck_main() | |||
error() << e << eom; | |||
} | |||
|
|||
catch(const invalid_source_file_exceptiont &e) |
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.
🎉
This enables proper use in the C front-end in a way that is compatible
with the compiler-specific message handlers in goto-cc: those message
handlers generate source-location output that mimics that of the
compiler being emulated.
As future work it is thus possible to remove all "throw 0" instances
from the C front-end.