-
Notifications
You must be signed in to change notification settings - Fork 59
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
Coverity Scan parsing errors #39
Comments
Looks like some problem in coverity. i.e: #ifdef COVERITY //is there a macro like this?
#define W_OBJECT_IMPL(...) /* nothing */
#define W_SIGNAL(...) ;
//... |
AFAIK, Coverity defines the But I'm not sure that this would work this way as you suggest here. Coverity is a static analyzer, and I would assume that it still tries to evaluate both branches of a such a macro. And besides, this is really not what I want. I want Coverity to check the code as-is. If you say that this is all legal standard C++ you're using and not some non-standard extensions, the fault is clearly with Coverity there. I guess I should contact them about it. I just hoped that you might say "yeah, this is broken, let me fix it", or something. :P |
IIRC coverity uses a relatively old version of clang for their C++ parsing. |
This is all legal standard C++. But this uses fairly advanced constexpr/template meta-programming, which tends to expose bugs in compilers. In particular, I think these issues are bugs.
There is no incomplete types there. N has a default value of 255. Maybe it got confused because the inheritence tree is quite big.
I am not aware of any variable using themself in their initializer.
Seems related to the previous error.
I would very much doubt that coverity tries to evaluate both branch of preprocessor
All what these macro does is to generate the QMetaObject at compile time. It has no effect on the rest of code, and should therefore let coverity to continue to report the same errors. |
Coverity Scan seems to choke on a few of Verdigris constructions, entirely skipping certain compilation units with a "Unrecoverable parse warning (PARSE_ERROR)" note.
The repository in question is https://github.com/xoreos/phaethon , the Coverity Scan page is https://scan.coverity.com/projects/xoreos-phaethon (the issues themselves aren't viewable without registering and poking me for access to that project, though). We're using Verdigris from git commit 11ee05b.
Below is a copy of the issues.
2", "argument_list_types_add_on: argument types are: (w_internal::w_number<255>, GUI::PanelResourceInfo::W_ThisType **)" in my src/gui/panelresourceinfo.h:64.
I'll gladly try to provide more information if you need it, but Coverity Scan itself doesn't give me more, I think.
Neither gcc nor clang, neither locally nor on Travis CI, seem to have a problem with the code, only Coverity Scan throws there. The scan build itself was build on Travis CI with gcc and uploaded to Coverity Scan by the Travis VM.
The text was updated successfully, but these errors were encountered: