1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 11:55:40 +02:00

Removed duplicate and empty names from the completion node.

This commit is contained in:
Doug Schaefer 2005-03-28 21:25:24 +00:00
parent c47e2bcfca
commit 1dbadaeb96
2 changed files with 3 additions and 5 deletions

View file

@ -529,10 +529,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
expr.setName(exprName);
exprName.setParent(expr);
exprName.setPropertyInParent(IASTIdExpression.ID_NAME);
createCompletionNode(token);
completionNode.addName(exprName);
// Now the declaration statement
IASTDeclarationStatement declStmt = createDeclarationStatement();
declStmt.setParent(result);
@ -549,7 +546,6 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
declSpec.setName(declSpecName);
declSpecName.setParent(declSpec);
declSpecName.setPropertyInParent(IASTNamedTypeSpecifier.NAME);
completionNode.addName(declSpecName);
}
}

View file

@ -4365,6 +4365,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
mostRelevantScopeNode = translationUnit;
while (true) {
try {
if (LT(1) == IToken.tEOC)
break;
int checkOffset = LA(1).hashCode();
IASTDeclaration declaration = declaration();
translationUnit.addDeclaration(declaration);