-
Notifications
You must be signed in to change notification settings - Fork 280
[HOTFIX] Add a pragma to silence warning for libcprover-cpp/options.h include #7418
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
Conversation
src/libcprover-cpp/api.h
Outdated
@@ -12,6 +12,14 @@ class goto_modelt; | |||
class message_handlert; | |||
class optionst; | |||
|
|||
// There's has been a design decision to allow users to include all of |
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.
Nit pick: spurious 's
src/libcprover-cpp/api.h
Outdated
// IWYU pragma: keep | ||
#include "options.h" |
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.
I believe you need to put the comment on the same line as the include.
8dda225
to
32560ff
Compare
Thanks @tautschnig, both of the comments have been addressed. |
@tautschnig Include what you use is still failing. The line it appears to be complaining about isn't even an include?! |
Codecov ReportBase: 78.36% // Head: 78.38% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7418 +/- ##
===========================================
+ Coverage 78.36% 78.38% +0.01%
===========================================
Files 1651 1651
Lines 190009 190045 +36
===========================================
+ Hits 148896 148961 +65
+ Misses 41113 41084 -29
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Adding the error in the CI here because I will implement a change to suppress it, in case people want to have a look:
|
Well, yes, include-what-you-use also helps you with forward declarations. |
32560ff
to
1496828
Compare
Ah. I hadn't realised it examined forward declarations as well. If we remove the forward declaration of I am not sure "it still compiles if I remove this" is a sufficiently good test in this case. Removing the forward declaration will save no compilation time and add maintenance work. |
We have probably spent way too much time debating a piece of code that might look quite different a week from now. Even if it were to be more stable than this: everyone should feel free to override what the include-what-you-use tool says. All that I wanted to make sure when adding this CI task was that we don't have completely useless includes that are unintentionally left behind. |
This silences a CI warning by one of our auxiliary runs, which
checks whether an include inside a file is used.
This change adds the rationale as a comment, and it also adds
a
pragma
directive for the tool to silence the warning.