[ClavaAst] SourceLocation now normalizes input filepath to an absolute
path
package pt.up.fe.specs.clava;
+import java.io.File;
+
public class SourceLocation {
private static final int INVALID_POSITION = -1;
@@ -35,7 +37,8 @@ public class SourceLocation {
private final int column;
public SourceLocation(String filepath, int line, int col) {
- this.filepath = filepath;
+ // Normalize filepath
+ this.filepath = filepath != null ? new File(filepath).getAbsolutePath() : null;
this.line = line;
this.column = col;
}
