Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorNathan Ridge2017-10-06 20:11:45 +0000
committerNathan Ridge2017-10-13 17:53:17 +0000
commit9792a72dae95f9299bf94e54308887ef020fea79 (patch)
tree11584fef98bf2319b8a408222d236393b7bf8084 /codan
parentf5c009476753ba4f5217db8569275bea811b5167 (diff)
downloadorg.eclipse.cdt-9792a72dae95f9299bf94e54308887ef020fea79.tar.gz
org.eclipse.cdt-9792a72dae95f9299bf94e54308887ef020fea79.tar.xz
org.eclipse.cdt-9792a72dae95f9299bf94e54308887ef020fea79.zip
Bug 525438 - Fix file path comparison in AbstractIndexAstChecker.getLineCommentsForLocation()
Using IPath.toPortableString() was causing a forward slash vs. backward slash mismtach in the path comparison on Windows. Change-Id: Ib3eb392065fb473f6b6e70cb1dcddceb34ae7240
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java
index c9ec33b5e0..9fdd4d96a1 100644
--- a/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java
+++ b/codan/org.eclipse.cdt.codan.core.cxx/src/org/eclipse/cdt/codan/core/cxx/model/AbstractIndexAstChecker.java
@@ -171,8 +171,7 @@ public abstract class AbstractIndexAstChecker extends AbstractCheckerWithProblem
for (IASTComment comm : commentsArray) {
IASTFileLocation fileLocation = comm.getFileLocation();
if (fileLocation.getStartingLineNumber() == loc.getLineNumber()) {
- //XXX check on windows portable or os?
- String problemFile = loc.getFile().getLocation().toPortableString();
+ String problemFile = loc.getFile().getLocation().toOSString();
String commentFile = fileLocation.getFileName();
if (problemFile.equals(commentFile)) {
lineComments.add(comm);

Back to the top