Files
codeql/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ast_ir_gvn.ql
Jonas Jensen 3236cbd83e C++: Test the AST wrapper for IR GVN
Out of our 3 GVN libraries, the one we actually use in production didn't
have tests -- except indirectly through `diff_ir_expr.ql`.
2020-12-21 08:21:02 +01:00

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(), " "
)