Update cpp/ql/src/semmle/code/cpp/Location.qll

Co-authored-by: Jonas Jensen <jbj@github.com>
This commit is contained in:
Geoffrey White
2021-06-04 16:19:11 +01:00
committed by GitHub
parent a93246d28b
commit 3c6a1f165b

View File

@@ -128,7 +128,7 @@ deprecated library class LocationExpr extends Location, @location_expr { }
* Gets the length of the longest line in file `f`.
*/
pragma[nomagic]
private int maxCols(File f) { result = max(Location l | l.getFile() = f | [l.getStartColumn(), l.getEndColumn()]) }
private int maxCols(File f) { result = max(Location l | l.getFile() = f | l.getStartColumn().maximum(l.getEndColumn())) }
/**
* A C/C++ element that has a location in a file