| Summary: | IProblemBinding.getCandidateBindings() reports functions twice (ast-binding and index binding) | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Thomas Kallenberg <thomas> |
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | REOPENED --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | minor | ||
| Priority: | P3 | CC: | yevshif |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
It's a problem binding because the argument-list does not match the parameters of the function. sure, but the only available candidate of the problembinding is reported twice... (In reply to comment #2) > sure, but the only available candidate of the problembinding is reported > twice... Ah, I did not think that this would be an issue. |
Build Identifier: 20110204-0611 If I try to resolve the binding for the name (a) func() in the following code void func(int i) { } void testFunc() { (a) func(); } after i ran a full rebuild of the indexer the binding is a problembinding with two candidates. first it finds the function in the local ast (which is a CPPFunction) and then in the indexer (which is of type PDOMCPPFunction) I think the problem could be in CPPScope function: getBindings(IASTName name, boolean resolve, boolean prefixLookup, IIndexFileSet fileSet, boolean checkPointOfDecl) first the function gets the function from AST with: getBindingsInAST(name, resolve, prefixLookup, checkPointOfDecl) and later it finds it again with: index.findBindings(nchars, filter, null). So, first question: is this behavior correct? Why it reports the same function twice? I cannot see any benefits. Even more, if rely on the number of candidates the behavior is misleading. Thanx Thomas Reproducible: Always Steps to Reproduce: 1. Write the global free function 2. rebuild the indexer manually 3. look at the candidates of the problembinding