Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorAlena Laskavaia2009-04-21 00:47:03 +0000
committerAlena Laskavaia2009-04-21 00:47:03 +0000
commit86a922370c581c24435eb97f6064b194c6cfe80c (patch)
tree9b81f6d117aada7f3e97ef7614c60057293df6d2 /codan
parentd02fb6433da841c8da906a0241e4849cfc07d8b8 (diff)
downloadorg.eclipse.cdt-86a922370c581c24435eb97f6064b194c6cfe80c.tar.gz
org.eclipse.cdt-86a922370c581c24435eb97f6064b194c6cfe80c.tar.xz
org.eclipse.cdt-86a922370c581c24435eb97f6064b194c6cfe80c.zip
added comments
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/checkers/sample/StatementHasNoEffectChecker.java5
1 files changed, 4 insertions, 1 deletions
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)

Back to the top