From 9b9bf1a17c06a089e3930733abe888c0d8c59669 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Tue, 16 Sep 2003 15:34:43 +0000 Subject: [PATCH] IASTFunction::previouslyDeclared implementation --- core/org.eclipse.cdt.core/parser/ChangeLog | 3 +++ .../core/parser/ast/complete/CompleteParseASTFactory.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog b/core/org.eclipse.cdt.core/parser/ChangeLog index 6abff558bf2..82c6687d57f 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog +++ b/core/org.eclipse.cdt.core/parser/ChangeLog @@ -1,3 +1,6 @@ +2003-09-16 John Camelon + Implement CompleteParse IASTFunction::previouslyDeclared(). + 2003-09-16 Hoda Amer In completeParseASTFactory.getExpressionResultType(): Added the support for expression type PRIMARY_THIS. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java index 6ee28a48069..914399eed23 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java @@ -1677,6 +1677,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto } } symbol.setIsForwardDeclaration(!isFunctionDefinition); + boolean previouslyDeclared = false; if( isFunctionDefinition ) { @@ -1697,6 +1698,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto if( functionDeclaration != null ) { + previouslyDeclared = true; functionDeclaration.setTypeSymbol( symbol ); // set the definition visibility = declaration visibility ASTMethodReference reference = (ASTMethodReference) functionReferences.iterator().next(); @@ -1719,8 +1721,6 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto throw new ASTSemanticException(); } - boolean previouslyDeclared = false; - //TODO : Hoda - if symbol was previously declared in PST, then set this to true ASTMethod method = new ASTMethod( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, isConstructor, isDestructor, isPureVirtual, visibility, constructorChain ); try