mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
IASTFunction::previouslyDeclared implementation
This commit is contained in:
parent
6f580b7c1a
commit
9b9bf1a17c
2 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2003-09-16 John Camelon
|
||||||
|
Implement CompleteParse IASTFunction::previouslyDeclared().
|
||||||
|
|
||||||
2003-09-16 Hoda Amer
|
2003-09-16 Hoda Amer
|
||||||
In completeParseASTFactory.getExpressionResultType(): Added the support
|
In completeParseASTFactory.getExpressionResultType(): Added the support
|
||||||
for expression type PRIMARY_THIS.
|
for expression type PRIMARY_THIS.
|
||||||
|
|
|
@ -1677,6 +1677,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
symbol.setIsForwardDeclaration(!isFunctionDefinition);
|
symbol.setIsForwardDeclaration(!isFunctionDefinition);
|
||||||
|
boolean previouslyDeclared = false;
|
||||||
|
|
||||||
if( isFunctionDefinition )
|
if( isFunctionDefinition )
|
||||||
{
|
{
|
||||||
|
@ -1697,6 +1698,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
|
|
||||||
if( functionDeclaration != null )
|
if( functionDeclaration != null )
|
||||||
{
|
{
|
||||||
|
previouslyDeclared = true;
|
||||||
functionDeclaration.setTypeSymbol( symbol );
|
functionDeclaration.setTypeSymbol( symbol );
|
||||||
// set the definition visibility = declaration visibility
|
// set the definition visibility = declaration visibility
|
||||||
ASTMethodReference reference = (ASTMethodReference) functionReferences.iterator().next();
|
ASTMethodReference reference = (ASTMethodReference) functionReferences.iterator().next();
|
||||||
|
@ -1719,8 +1721,6 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
throw new ASTSemanticException();
|
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 );
|
ASTMethod method = new ASTMethod( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, isConstructor, isDestructor, isPureVirtual, visibility, constructorChain );
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue