Community
Participate
Working Groups
Build Identifier: HEAD Create a C/C++ project containing the following two files: // sabel.hpp #include <iostream> using std::cout; // sabel.cpp #include "sabel.hpp" using namespace ::std; void sabel() { cout << "test"; } "cout" will be reported as a name resolution problem that looks like an ambiguity. If I remove the using directive in the source file or the using declaration in the header file, the indexer doesn't complain. Additionally, if I move the using declaration into the source file, the indexer does not complain either. Reproducible: Always
Thanks, I'll have a look at this.
Created attachment 180332 [details] testcase + fix
Fixed in 7.0.2 and 8.0 > 20101006.
*** cdt cvs genie on behalf of mschorn *** Bug 326778: Bogus ambiguity due to different using declarations for the same variable. [*] IndexCPPBindingResolutionBugs.java 1.45 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java?root=Tools_Project&r1=1.44&r2=1.45 [*] CPPSemantics.java 1.187 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java?root=Tools_Project&r1=1.186&r2=1.187
*** cdt cvs genie on behalf of mschorn *** Bug 326778: Bogus ambiguity due to different using declarations for the same variable. [*] CPPSemantics.java 1.164.2.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java?root=Tools_Project&r1=1.164.2.2&r2=1.164.2.3 [*] IndexCPPBindingResolutionBugs.java 1.41.2.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java?root=Tools_Project&r1=1.41.2.3&r2=1.41.2.4
(In reply to comment #3) > Fixed in 7.0.2 and 8.0 > 20101006. Hey, you cut the percentage of unresolved names in half for my workspace!! This example was extracted from usages of the ACE libraries, so I'm possible not alone. Anyway, with the name resolution problem now being shown in the problems view, I expect that the indexer will climb a compiler-like level of correctness with Indigo. Thanks again for this fix.