mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Cosmetics.
This commit is contained in:
parent
8dc598a145
commit
3bb26e3de2
3 changed files with 14 additions and 20 deletions
|
@ -159,7 +159,8 @@ public abstract class VariableReadWriteFlags {
|
||||||
return READ | WRITE; // fall back
|
return READ | WRITE; // fall back
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int rwArgumentForFunctionCall(final IASTFunctionCallExpression funcCall, IASTNode argument, int indirection) {
|
protected int rwArgumentForFunctionCall(final IASTFunctionCallExpression funcCall,
|
||||||
|
IASTNode argument, int indirection) {
|
||||||
final IASTInitializerClause[] args = funcCall.getArguments();
|
final IASTInitializerClause[] args = funcCall.getArguments();
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
if (args[i] == argument) {
|
if (args[i] == argument) {
|
||||||
|
@ -192,13 +193,11 @@ public abstract class VariableReadWriteFlags {
|
||||||
if (node.getPropertyInParent() == IASTCaseStatement.EXPRESSION) {
|
if (node.getPropertyInParent() == IASTCaseStatement.EXPRESSION) {
|
||||||
return READ;
|
return READ;
|
||||||
}
|
}
|
||||||
}
|
} else if (stmt instanceof IASTDoStatement) {
|
||||||
else if (stmt instanceof IASTDoStatement) {
|
|
||||||
if (node.getPropertyInParent() == IASTDoStatement.CONDITION) {
|
if (node.getPropertyInParent() == IASTDoStatement.CONDITION) {
|
||||||
return READ;
|
return READ;
|
||||||
}
|
}
|
||||||
}
|
} else if (stmt instanceof IASTExpressionStatement) {
|
||||||
else if (stmt instanceof IASTExpressionStatement) {
|
|
||||||
IASTNode parent= stmt.getParent();
|
IASTNode parent= stmt.getParent();
|
||||||
while (parent instanceof IASTCompoundStatement) {
|
while (parent instanceof IASTCompoundStatement) {
|
||||||
IASTCompoundStatement compound= (IASTCompoundStatement) parent;
|
IASTCompoundStatement compound= (IASTCompoundStatement) parent;
|
||||||
|
@ -220,24 +219,19 @@ public abstract class VariableReadWriteFlags {
|
||||||
if (node.getPropertyInParent() == ICPPASTRangeBasedForStatement.INITIALIZER) {
|
if (node.getPropertyInParent() == ICPPASTRangeBasedForStatement.INITIALIZER) {
|
||||||
return READ;
|
return READ;
|
||||||
}
|
}
|
||||||
}
|
} else if (stmt instanceof IASTIfStatement) {
|
||||||
else if (stmt instanceof IASTIfStatement) {
|
|
||||||
if (node.getPropertyInParent() == IASTIfStatement.CONDITION) {
|
if (node.getPropertyInParent() == IASTIfStatement.CONDITION) {
|
||||||
return READ;
|
return READ;
|
||||||
}
|
}
|
||||||
}
|
} else if (stmt instanceof IASTProblemStatement) {
|
||||||
else if (stmt instanceof IASTProblemStatement) {
|
|
||||||
return READ | WRITE;
|
return READ | WRITE;
|
||||||
}
|
} else if (stmt instanceof IASTReturnStatement) {
|
||||||
else if (stmt instanceof IASTReturnStatement) {
|
|
||||||
return indirection == 0 ? READ : WRITE;
|
return indirection == 0 ? READ : WRITE;
|
||||||
}
|
} else if (stmt instanceof IASTSwitchStatement) {
|
||||||
else if (stmt instanceof IASTSwitchStatement) {
|
|
||||||
if (node.getPropertyInParent() == IASTSwitchStatement.CONTROLLER_EXP) {
|
if (node.getPropertyInParent() == IASTSwitchStatement.CONTROLLER_EXP) {
|
||||||
return READ;
|
return READ;
|
||||||
}
|
}
|
||||||
}
|
} else if (stmt instanceof IASTWhileStatement) {
|
||||||
else if (stmt instanceof IASTWhileStatement) {
|
|
||||||
if (node.getPropertyInParent() == IASTWhileStatement.CONDITIONEXPRESSION) {
|
if (node.getPropertyInParent() == IASTWhileStatement.CONDITIONEXPRESSION) {
|
||||||
return READ;
|
return READ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue