mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Cosmetics.
This commit is contained in:
parent
b91a639643
commit
25f52b35c9
1 changed files with 16 additions and 12 deletions
|
@ -30,7 +30,8 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
|
||||||
/**
|
/**
|
||||||
* Gnu-extension: ({ ... })
|
* Gnu-extension: ({ ... })
|
||||||
*/
|
*/
|
||||||
public class CPPASTCompoundStatementExpression extends ASTNode implements IGNUASTCompoundStatementExpression, ICPPASTExpression {
|
public class CPPASTCompoundStatementExpression extends ASTNode
|
||||||
|
implements IGNUASTCompoundStatementExpression, ICPPASTExpression {
|
||||||
private IASTCompoundStatement fStatement;
|
private IASTCompoundStatement fStatement;
|
||||||
private ICPPEvaluation fEval;
|
private ICPPEvaluation fEval;
|
||||||
private IASTImplicitDestructorName[] fImplicitDestructorNames;
|
private IASTImplicitDestructorName[] fImplicitDestructorNames;
|
||||||
|
@ -72,9 +73,11 @@ public class CPPASTCompoundStatementExpression extends ASTNode implements IGNUAS
|
||||||
if (fStatement != null) {
|
if (fStatement != null) {
|
||||||
IASTStatement[] statements = fStatement.getStatements();
|
IASTStatement[] statements = fStatement.getStatements();
|
||||||
if (statements.length > 0) {
|
if (statements.length > 0) {
|
||||||
IASTStatement st = statements[statements.length - 1];
|
IASTStatement lastStatement = statements[statements.length - 1];
|
||||||
if (st instanceof IASTExpressionStatement) {
|
if (lastStatement instanceof IASTExpressionStatement) {
|
||||||
fEval= new EvalCompound(((ICPPASTExpression) ((IASTExpressionStatement) st).getExpression()).getEvaluation(), this);
|
ICPPASTExpression expression =
|
||||||
|
(ICPPASTExpression) ((IASTExpressionStatement) lastStatement).getExpression();
|
||||||
|
fEval= new EvalCompound(expression.getEvaluation(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +106,8 @@ public class CPPASTCompoundStatementExpression extends ASTNode implements IGNUAS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fStatement != null && !fStatement.accept(action)) return false;
|
if (fStatement != null && !fStatement.accept(action))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
|
if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue