mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Out of our 3 GVN libraries, the one we actually use in production didn't have tests -- except indirectly through `diff_ir_expr.ql`.
12 lines
285 B
Plaintext
12 lines
285 B
Plaintext
import cpp
|
|
import semmle.code.cpp.ir.internal.ASTValueNumbering
|
|
|
|
from GVN g
|
|
where strictcount(g.getAnExpr()) > 1
|
|
select g,
|
|
strictconcat(Location loc |
|
|
loc = g.getAnExpr().getLocation()
|
|
|
|
|
loc.getStartLine() + ":c" + loc.getStartColumn() + "-c" + loc.getEndColumn(), " "
|
|
)
|