1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2014-01-03 17:07:16 -08:00
parent 4f8e498fa7
commit 59b67cd28b
3 changed files with 7 additions and 7 deletions

View file

@ -41,7 +41,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.FunctionSetType;
public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpression, IASTAmbiguityParent { public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpression, IASTAmbiguityParent {
private int fOperator; private int fOperator;
private ICPPASTExpression fOperand; private ICPPASTExpression fOperand;
private IASTImplicitName[] fImplicitNames = null; private IASTImplicitName[] fImplicitNames;
private ICPPEvaluation fEvaluation; private ICPPEvaluation fEvaluation;
public CPPASTUnaryExpression() { public CPPASTUnaryExpression() {
@ -59,8 +59,8 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
@Override @Override
public CPPASTUnaryExpression copy(CopyStyle style) { public CPPASTUnaryExpression copy(CopyStyle style) {
CPPASTUnaryExpression copy = new CPPASTUnaryExpression(fOperator, fOperand == null ? null CPPASTUnaryExpression copy =
: fOperand.copy(style)); new CPPASTUnaryExpression(fOperator, fOperand == null ? null : fOperand.copy(style));
return copy(copy, style); return copy(copy, style);
} }
@ -237,5 +237,4 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
public boolean isLValue() { public boolean isLValue() {
return getValueCategory() == LVALUE; return getValueCategory() == LVALUE;
} }
} }

View file

@ -292,9 +292,10 @@ public abstract class FlowInfo {
// Must not consider return kind since a return statement can't control execution flow // Must not consider return kind since a return statement can't control execution flow
// inside a method. It always leaves the method. // inside a method. It always leaves the method.
if (branches()) { if (branches()) {
for (int i= 0; i < others.length; i++) for (int i= 0; i < others.length; i++) {
others[i]= ACCESS_MODE_OPEN_BRANCH_TABLE[getIndex(others[i])]; others[i]= ACCESS_MODE_OPEN_BRANCH_TABLE[getIndex(others[i])];
} }
}
if (fAccessModes == null) { // all current variables are unused if (fAccessModes == null) { // all current variables are unused
fAccessModes= others; fAccessModes= others;

View file

@ -131,9 +131,9 @@ public class InputFlowAnalyzer extends FlowAnalyzer {
forInfo.mergeAction(actionInfo, fFlowContext); forInfo.mergeAction(actionInfo, fFlowContext);
} else { } else {
// We have to merge two different cases. One if we reenter the for statement // We have to merge two different cases. One if we reenter the for statement
// immediatelly (that means we have to consider increments, condition and action) // immediately (that means we have to consider increments, condition and action)
// and the other case if we reenter the for in the next loop of // and the other case if we reenter the for in the next loop of
// the outer loop. Then we have to consider initializations, condtion and action. // the outer loop. Then we have to consider initializations, condition and action.
// For a conditional flow info that means: // For a conditional flow info that means:
// (initializations | increments) & condition & action. // (initializations | increments) & condition & action.
GenericConditionalFlowInfo initIncr= new GenericConditionalFlowInfo(); GenericConditionalFlowInfo initIncr= new GenericConditionalFlowInfo();