diff options
author | Elliott Baron <ebaron@fedoraproject.org> | 2009-12-16 16:51:53 -0500 |
---|---|---|
committer | Elliott Baron <ebaron@fedoraproject.org> | 2009-12-16 16:51:53 -0500 |
commit | af92b8417ae76946c7d10772d8848abbe1126209 (patch) | |
tree | 4f1f7ab3def1e2e5facd2582645f663aba399fc3 /org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java | |
parent | 4baa2f35d979b4e2336431460e313e055661327f (diff) | |
download | codan-af92b8417ae76946c7d10772d8848abbe1126209.tar.gz codan-af92b8417ae76946c7d10772d8848abbe1126209.tar.xz codan-af92b8417ae76946c7d10772d8848abbe1126209.zip |
Update codan plugins to HEAD.
* org.eclipse.cdt.codan.checkers.ui: Updated.
* org.eclipse.cdt.codan.checkers: Updated.
* org.eclipse.cdt.codan.core: Updated.
* org.eclipse.cdt.codan.ui: Updated.
Diffstat (limited to 'org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java')
-rw-r--r-- | org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java b/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java index 2c87b07..d805f2f 100644 --- a/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java +++ b/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java @@ -85,12 +85,18 @@ public abstract class AbstractIndexAstChecker extends AbstractChecker implements if (astFile == null) { astFile = file; } - getProblemReporter().reportProblem( - id, - new ProblemLocation(astFile, astLocation - .getStartingLineNumber()), message); + ProblemLocation loc; + if (astLocation.getStartingLineNumber() == astLocation + .getEndingLineNumber()) + loc = new ProblemLocation(astFile, astLocation.getNodeOffset(), + astLocation.getNodeOffset() + astLocation.getNodeLength()); + else + loc = new ProblemLocation(astFile, astLocation + .getStartingLineNumber()); + getProblemReporter().reportProblem(id, loc, message); } + @Override public boolean runInEditor() { return true; } |