Files
codeql/cpp/ql/test/library-tests/valuenumbering/HashCons/Uniqueness.ql
2018-09-10 12:22:43 -07:00

9 lines
259 B
Plaintext

import cpp
import semmle.code.cpp.valuenumbering.HashCons
// Every expression should have exactly one HC.
// So this query should have zero results.
from Expr e
where count(hashCons(e)) != 1
select e, concat(HashCons h | h = hashCons(e) | h.getKind(), ", ")