Repository navigation
verify: Report a function template only when it has contracts - #21
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Any function template written in the main file stopped verification of the whole file with
error: twice: function template verification is unsupported, even one without contracts that no verified function calls:On main
incgets no verdict. A template is now reported only when it has contracts or contract statements, as member functions already are. One without them matters only where verified code calls it, and that call is already reported (call to function without a verification contract: twice).Testing:
suite/unused_template.cppfails on main; it also checks the call from verified code and a template with acppverify::check, which stays an error and which dropping the contract-statement test misses. Verify suite: 398 passed, 1 unsupported. A verdict differential against main over the 405 Verify sources changes onlybackward_compat_exhaustive.cpp, plain C++ whose uncontractedtemplatedstopped the file on main;decode_uleb128_length_10timed out on main under load in that run.