From 86a922370c581c24435eb97f6064b194c6cfe80c Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Tue, 21 Apr 2009 00:47:03 +0000 Subject: [PATCH] added comments --- .../codan/checkers/sample/StatementHasNoEffectChecker.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/StatementHasNoEffectChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/StatementHasNoEffectChecker.java index 14d4d61a078..e961646a02e 100644 --- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/StatementHasNoEffectChecker.java +++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/StatementHasNoEffectChecker.java @@ -63,7 +63,8 @@ public class StatementHasNoEffectChecker extends AbstractIndexAstChecker { /** * We consider has not effect binary statements without assignment and - * unary statement which is not dec and inc + * unary statement which is not dec and inc. If operator is overloaded + * we not going to bother. * * @param e * @return @@ -74,6 +75,8 @@ public class StatementHasNoEffectChecker extends AbstractIndexAstChecker { if (binExpr.getOperator() == IASTBinaryExpression.op_assign) return false; if (binExpr instanceof CPPASTBinaryExpression) { + // unfortunately ICPPASTBinaryExpression does not have + // getOverload public method CPPASTBinaryExpression cppBin = (CPPASTBinaryExpression) binExpr; ICPPFunction overload = cppBin.getOverload(); if (overload != null)