| Summary: | Code analysis "Invalid Argument" reports invalid argument which is valid | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Kocka Mising name <kosztkaid> | ||||
| Component: | cdt-indexer | Assignee: | Project Inbox <cdt-indexer-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, kolsrud, malaperle, vkrevs, yevshif | ||||
| Version: | 8.1.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I've just tried "Eclipse IDE for C/C++ Developers" from Indigo RC4 on a project, and "code analysis" mistakenly reports many "Method cannot be resolved" errors. Also, Ctrl-click on such methods no longer works either. "Eclipse IDE for C/C++ Developers" from Helios SR2 has no such problems on the same codebase (and Ctrl-click on such methods works just fine in Helios SR2). (In reply to Kocka Mising name from comment #0) > Created attachment 197290 [details] > Screen Shoot of the bug > > In the following example "result.push_back(*it);" Is marked with "Invalid > Argument" by Code analysis. This code works fine as of CDT 8.4 (and probably a bit earlier). (In reply to Missing name from comment #1) > I've just tried "Eclipse IDE for C/C++ Developers" from Indigo RC4 on a > project, and "code analysis" mistakenly reports many "Method cannot be > resolved" errors. Also, Ctrl-click on such methods no longer works either. > "Eclipse IDE for C/C++ Developers" from Helios SR2 has no such problems on > the same codebase (and Ctrl-click on such methods works just fine in Helios > SR2). The error reporting was new in Indigo but the indexer problems were not new. If you still have problems, you can create a specific bug with sample code to illustrate the problem. Bugs like this are worked on and fixed one by one in separate Bugzilla entries. |
Created attachment 197290 [details] Screen Shoot of the bug In the following example "result.push_back(*it);" Is marked with "Invalid Argument" by Code analysis. #include <iostream> #include <vector> #include <boost/tokenizer.hpp> #include <string> using namespace std; using namespace boost; int main() { vector<string> result; string temp; tokenizer<> tokens(temp); for (tokenizer<>::const_iterator it = tokens.begin(); tokens.end() != it; ++it) { result.push_back(*it); } return (0); }