C++: Prevent IR re-evaluation by importing GVN.

This commit is contained in:
Mathias Vorreiter Pedersen
2020-11-24 17:04:54 +01:00
parent fd4f8c557c
commit 648acc3bfc

View File

@@ -12,8 +12,11 @@
* security
*/
import semmle.code.cpp.ir.IR
import cpp
// We don't actually use the global value numbering library in this query, but without it we end up
// recomputing the IR.
private import semmle.code.cpp.valuenumbering.GlobalValueNumbering
private import semmle.code.cpp.ir.IR
bindingset[n, result]
int unbind(int n) { result >= n and result <= n }