1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Performance improvement for indexing c-code (related to bug 167311).

This commit is contained in:
Markus Schorn 2007-11-27 13:53:07 +00:00
parent 0387b359a8
commit d1725e3cdd
2 changed files with 13 additions and 0 deletions

View file

@ -101,4 +101,10 @@ public class ASTInternal {
}
return var.isStatic();
}
public static void setFullyResolved(IBinding binding, boolean val) {
if (binding instanceof ICInternalFunction) {
((ICInternalFunction) binding).setFullyResolved(true);
}
}
}

View file

@ -41,6 +41,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
import org.eclipse.cdt.core.index.IIndexFile;
import org.eclipse.cdt.core.index.IIndexFileLocation;
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
import org.eclipse.cdt.internal.core.index.IIndexFragmentFile;
import org.eclipse.cdt.internal.core.index.IWritableIndex;
import org.eclipse.cdt.internal.core.index.IndexFileLocation;
@ -455,6 +456,12 @@ abstract public class PDOMWriter {
IASTPreprocessorMacroDefinition[] macros= (IASTPreprocessorMacroDefinition[]) list.toArray(new IASTPreprocessorMacroDefinition[list.size()]);
list= lists[2];
IASTName[][] names= (IASTName[][]) list.toArray(new IASTName[list.size()][]);
for (int j= 0; j<names.length; j++) {
final IASTName name= names[j][0];
if (name != null) {
ASTInternal.setFullyResolved(name.getBinding(), true);
}
}
list= lists[0];
IncludeInformation[] includeInfos= new IncludeInformation[list.size()];