Skip to content

Commit 6f05fd4

Browse files
committed
C++: Autoformat.
1 parent 799e19b commit 6f05fd4

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ deprecated library class LocationExpr extends Location, @location_expr { }
128128
* Gets the length of the longest line in file `f`.
129129
*/
130130
pragma[nomagic]
131-
private int maxCols(File f) { result = max(Location l | l.getFile() = f | l.getStartColumn().maximum(l.getEndColumn())) }
131+
private int maxCols(File f) {
132+
result = max(Location l | l.getFile() = f | l.getStartColumn().maximum(l.getEndColumn()))
133+
}
132134

133135
/**
134136
* A C/C++ element that has a location in a file

cpp/ql/test/library-tests/locations/charloc/charloc.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ from File f, Expr e, Location l, int start, int end
44
where
55
e.getLocation() = l and
66
l.charLoc(f, start, end)
7-
select f.getBaseName(), e.toString(), start, end, concat(Expr e2, Location l2 | e2.getLocation() = l2 and l.subsumes(l2) | e2.toString(), ", ")
7+
select f.getBaseName(), e.toString(), start, end,
8+
concat(Expr e2, Location l2 | e2.getLocation() = l2 and l.subsumes(l2) | e2.toString(), ", ")

cpp/ql/test/query-tests/definitions/locationInfo.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ class Link extends Top {
1111
* Gets the length of the longest line in file `f`.
1212
*/
1313
pragma[nomagic]
14-
private int maxCols(File f) { result = max(Location l | l.getFile() = f | l.getStartColumn().maximum(l.getEndColumn())) }
15-
14+
private int maxCols(File f) {
15+
result = max(Location l | l.getFile() = f | l.getStartColumn().maximum(l.getEndColumn()))
16+
}
17+
1618
/**
1719
* Gets the location of an element that has a link-to-definition (in a similar manner to
1820
* `Location.charLoc`)

0 commit comments

Comments
 (0)