mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Hoda Amer
Core: -Solution to [Bug 43053] require reference cleanup for expressions Added purgeReferences() at the end of ASTExpression::acceptElement()
This commit is contained in:
parent
c4640566cb
commit
1a408fd237
4 changed files with 44 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-09-30 Hoda Amer
|
||||||
|
-Solution to [Bug 43053] require reference cleanup for expressions
|
||||||
|
Added purgeReferences() at the end of ASTExpression::acceptElement()
|
||||||
|
|
||||||
2003-09-30 Andrew Niefer
|
2003-09-30 Andrew Niefer
|
||||||
PST changes for bug 43503 - parser needs to know the different between ambiguous functions
|
PST changes for bug 43503 - parser needs to know the different between ambiguous functions
|
||||||
and no functions when no parameter information is provided
|
and no functions when no parameter information is provided
|
||||||
|
|
|
@ -141,5 +141,6 @@ public interface IASTExpression extends ISourceElementCallbackDelegate
|
||||||
|
|
||||||
public int evaluateExpression() throws ExpressionEvaluationException;
|
public int evaluateExpression() throws ExpressionEvaluationException;
|
||||||
public void reconcileReferences() throws ASTNotImplementedException;
|
public void reconcileReferences() throws ASTNotImplementedException;
|
||||||
|
public void purgeReferences() throws ASTNotImplementedException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,6 +155,15 @@ public class ASTExpression implements IASTExpression
|
||||||
|
|
||||||
if( newDescriptor != null )
|
if( newDescriptor != null )
|
||||||
newDescriptor.acceptElement(requestor);
|
newDescriptor.acceptElement(requestor);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
purgeReferences();
|
||||||
|
}
|
||||||
|
catch (ASTNotImplementedException e)
|
||||||
|
{
|
||||||
|
// will not get thrown
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -226,5 +235,28 @@ public class ASTExpression implements IASTExpression
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTExpression#purgeReferences()
|
||||||
|
*/
|
||||||
|
public void purgeReferences() throws ASTNotImplementedException
|
||||||
|
{
|
||||||
|
if( lhs != null )
|
||||||
|
lhs.purgeReferences();
|
||||||
|
if( rhs != null )
|
||||||
|
rhs.purgeReferences();
|
||||||
|
if( thirdExpression != null )
|
||||||
|
thirdExpression.purgeReferences();
|
||||||
|
|
||||||
|
purgeSubExpression((ASTExpression)lhs);
|
||||||
|
purgeSubExpression((ASTExpression)rhs);
|
||||||
|
purgeSubExpression((ASTExpression)thirdExpression);
|
||||||
|
}
|
||||||
|
protected void purgeSubExpression(ASTExpression subExpression)
|
||||||
|
{
|
||||||
|
if( subExpression != null && subExpression.getReferences() != null )
|
||||||
|
{
|
||||||
|
subExpression.getReferences().clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,13 @@ public class ASTExpression implements IASTExpression {
|
||||||
{
|
{
|
||||||
throw new ASTNotImplementedException();
|
throw new ASTNotImplementedException();
|
||||||
}
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTExpression#purgeReferences()
|
||||||
|
*/
|
||||||
|
public void purgeReferences() throws ASTNotImplementedException
|
||||||
|
{
|
||||||
|
throw new ASTNotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue