mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
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
This commit is contained in:
parent
f5c0094767
commit
9792a72dae
1 changed files with 1 additions and 2 deletions
|
@ -171,8 +171,7 @@ public abstract class AbstractIndexAstChecker extends AbstractCheckerWithProblem
|
||||||
for (IASTComment comm : commentsArray) {
|
for (IASTComment comm : commentsArray) {
|
||||||
IASTFileLocation fileLocation = comm.getFileLocation();
|
IASTFileLocation fileLocation = comm.getFileLocation();
|
||||||
if (fileLocation.getStartingLineNumber() == loc.getLineNumber()) {
|
if (fileLocation.getStartingLineNumber() == loc.getLineNumber()) {
|
||||||
//XXX check on windows portable or os?
|
String problemFile = loc.getFile().getLocation().toOSString();
|
||||||
String problemFile = loc.getFile().getLocation().toPortableString();
|
|
||||||
String commentFile = fileLocation.getFileName();
|
String commentFile = fileLocation.getFileName();
|
||||||
if (problemFile.equals(commentFile)) {
|
if (problemFile.equals(commentFile)) {
|
||||||
lineComments.add(comm);
|
lineComments.add(comm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue