mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C++: Added charpred to ensure that only instructions that have a source representation have a GVN
This commit is contained in:
@@ -51,6 +51,12 @@ private import semmle.code.cpp.ir.IR
|
||||
* methods.
|
||||
*/
|
||||
class GVN extends TValueNumber {
|
||||
GVN() {
|
||||
exists(Instruction instr |
|
||||
this = tvalueNumber(instr) and exists(instr.getUnconvertedResultExpression())
|
||||
)
|
||||
}
|
||||
|
||||
private Instruction getAnInstruction() { this = tvalueNumber(result) }
|
||||
|
||||
final string toString() { result = "GVN" }
|
||||
|
||||
Reference in New Issue
Block a user