1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2016-05-24 14:05:32 -07:00
parent b91a639643
commit 25f52b35c9

View file

@ -30,7 +30,8 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
/**
* Gnu-extension: ({ ... })
*/
public class CPPASTCompoundStatementExpression extends ASTNode implements IGNUASTCompoundStatementExpression, ICPPASTExpression {
public class CPPASTCompoundStatementExpression extends ASTNode
implements IGNUASTCompoundStatementExpression, ICPPASTExpression {
private IASTCompoundStatement fStatement;
private ICPPEvaluation fEval;
private IASTImplicitDestructorName[] fImplicitDestructorNames;
@ -72,9 +73,11 @@ public class CPPASTCompoundStatementExpression extends ASTNode implements IGNUAS
if (fStatement != null) {
IASTStatement[] statements = fStatement.getStatements();
if (statements.length > 0) {
IASTStatement st = statements[statements.length - 1];
if (st instanceof IASTExpressionStatement) {
fEval= new EvalCompound(((ICPPASTExpression) ((IASTExpressionStatement) st).getExpression()).getEvaluation(), this);
IASTStatement lastStatement = statements[statements.length - 1];
if (lastStatement instanceof IASTExpressionStatement) {
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))
return false;