mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
use pragma[only_bind_into] to prevent bad join in Ssa::hasLocationInfo
This commit is contained in:
@@ -520,7 +520,10 @@ class SsaExplicitDefinition extends SsaDefinition, TExplicitDef {
|
||||
override predicate hasLocationInfo(
|
||||
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||
) {
|
||||
getDef().getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
exists(Location loc |
|
||||
pragma[only_bind_into](loc) = pragma[only_bind_into](getDef()).getLocation() and
|
||||
loc.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -552,7 +555,10 @@ abstract class SsaImplicitDefinition extends SsaDefinition {
|
||||
) {
|
||||
endline = startline and
|
||||
endcolumn = startcolumn and
|
||||
getBasicBlock().getLocation().hasLocationInfo(filepath, startline, startcolumn, _, _)
|
||||
exists(Location loc |
|
||||
pragma[only_bind_into](loc) = pragma[only_bind_into](getBasicBlock()).getLocation() and
|
||||
loc.hasLocationInfo(filepath, startline, startcolumn, _, _)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user