Community
Participate
Working Groups
Build Identifier: 20110615-0604 I have a file with code that compiles just fine, but with the inclusion of Codan in Indigo, Eclipse is telling me I have a problem that I believe is incorrect. When I use a type from a header file provided from a vendor, codan tells me it cannot resolve the type. So if I use a variable of that type in an if() statement or as a return value from a function, codan barfs. I'm attaching a screen shot and will put some code up if needed. Reproducible: Always Steps to Reproduce: 1. Declare a typedefed enum in a header 2. Make a varialbe of that type in a cpp file 3. Use the variable. Codan barfs.
Created attachment 199491 [details] Screencap of the problem
I can't reproduce this, can you provide some code? Also, try rebuilding the index (Right-click on project, Index, Rebuild).
Tried performing the Index rebuild, no help. I made a clean build with a very simple main and copy/pasted the offending enum. I will put both files up here, simply make a new empty C++ project and put these two files in. You should get the same error (I'll screencap as well).
Created attachment 199517 [details] Header file with enum
Created attachment 199518 [details] Main function for test project
Created attachment 199519 [details] Screencap of simple project w/ codan problem
That works for me too. Can you try the same simple project in a new workspace?
(In reply to comment #7) > That works for me too. Can you try the same simple project in a new workspace? I created a whole brand new workspace and then copied the source files into a brand new project and it yielded the same result. Could it be an issue with plug ins I may have? Or perhaps CODAN settings? Do you have something turned off in the Codan settings that is on by default? The only plugin I've added on top of the C++ Linux Eclipse package is CUTE, a unit testing framework.
It has to be some plug-in. I don't think we check for operator usage at all in the current checkers and I can't find that message pattern in codan.
(In reply to comment #9) > It has to be some plug-in. I don't think we check for operator usage at all in > the current checkers and I can't find that message pattern in codan. You are correct, my mistake. It is the plugin I am using for unit testing, CUTE... I'll email the authors with a link to this bug. Thank you!
I created a ticket at cute-test.com