1
0
Fork 0
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:
Markus Schorn 2010-05-05 09:20:26 +00:00
parent 346b25fada
commit 843b5f6343

View file

@ -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;