mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Performance improvement for computing overloaded operators.
This commit is contained in:
parent
346b25fada
commit
843b5f6343
1 changed files with 19 additions and 0 deletions
|
@ -2984,6 +2984,25 @@ public class CPPSemantics {
|
|||
doKoenigLookup(funcData);
|
||||
} catch (DOMException e) {
|
||||
}
|
||||
// Filter with file-set
|
||||
IASTTranslationUnit tu= parent.getTranslationUnit();
|
||||
if (tu != null && funcData.foundItems instanceof Object[]) {
|
||||
final IIndexFileSet fileSet = tu.getIndexFileSet();
|
||||
if (fileSet != null) {
|
||||
int j=0;
|
||||
final Object[] items= (Object[]) funcData.foundItems;
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
Object item = items[i];
|
||||
items[i]= null;
|
||||
if (item instanceof IIndexBinding) {
|
||||
if (!fileSet.containsDeclaration((IIndexBinding) item)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
items[j++]= item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (DOMException e) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue