Community
Participate
Working Groups
-- Configuration Details -- Product: Eclipse IDE 4.14.0.20191212-1200 (org.eclipse.epp.package.cpp.product)Installed Features: org.eclipse.platform 4.14.0.v20191210-0610 False positive in C++ code analysis. An error is presented as a red underline when a container is assigned to a container of the same type initialized with iterators. The code compiles and runs as intended. Reproducible in a clean install in both Linux and Mac. Example: #include <vector> using namespace std; int main(void) { vector <int> foo(5,1); //No error vector <int> bar(foo.begin(),foo.end()); //No error vector <int> cpp11 = {1,2,3,4,5}; //No error vector <int> whyIsThisAnError = vector <int> (foo.begin(),foo.end()); //ERROR vector <int> whyIsntThisAnError = std::vector <int> (foo.begin(),foo.end()); //No error return 0; }
Reassigned to parser component since Codan checker just reports problem bindings, nothing more.