Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java
index 2c87b07b83b..d805f2fbefd 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractIndexAstChecker.java
+++ b/codan/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;
}

Back to the top