Skip to content

Commit dd59f79

Browse files
committed
use min() instead of rank[1]()
1 parent 21d03cd commit dd59f79

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

cpp/ql/lib/semmle/code/cpp/PrintAST.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private string escapeString(string s) {
4646
* string representation comes first in lexicographical order.
4747
*/
4848
private Location getRepresentativeLocation(Locatable ast) {
49-
result = rank[1](Location loc | loc = ast.getLocation() | loc order by loc.toString())
49+
result = min(Location loc | loc = ast.getLocation() | loc order by loc.toString())
5050
}
5151

5252
/**

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module InstructionConsistency {
3535
// To avoid an overwhelming number of results when the extractor merges functions with the
3636
// same name, just pick a single location.
3737
result =
38-
rank[1](Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
38+
min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
3939
}
4040
}
4141

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module InstructionConsistency {
3535
// To avoid an overwhelming number of results when the extractor merges functions with the
3636
// same name, just pick a single location.
3737
result =
38-
rank[1](Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
38+
min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
3939
}
4040
}
4141

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module InstructionConsistency {
3535
// To avoid an overwhelming number of results when the extractor merges functions with the
3636
// same name, just pick a single location.
3737
result =
38-
rank[1](Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
38+
min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
3939
}
4040
}
4141

csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module InstructionConsistency {
3535
// To avoid an overwhelming number of results when the extractor merges functions with the
3636
// same name, just pick a single location.
3737
result =
38-
rank[1](Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
38+
min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
3939
}
4040
}
4141

csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module InstructionConsistency {
3535
// To avoid an overwhelming number of results when the extractor merges functions with the
3636
// same name, just pick a single location.
3737
result =
38-
rank[1](Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
38+
min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString())
3939
}
4040
}
4141

0 commit comments

Comments
 (0)