mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
C++: Factor out the property provider which hides instructions and operands out of the 'LocalFlowPropertyProvider' class and into a separate class.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
private import cpp
|
||||
private import semmle.code.cpp.ir.IR
|
||||
private import SsaInternals as Ssa
|
||||
|
||||
/**
|
||||
* Property provider that hides all instructions and operands that are not relevant for IR dataflow.
|
||||
*/
|
||||
class DataFlowRelevantIRPropertyProvider extends IRPropertyProvider {
|
||||
override predicate shouldPrintOperand(Operand operand) { not Ssa::ignoreOperand(operand) }
|
||||
|
||||
override predicate shouldPrintInstruction(Instruction instr) { not Ssa::ignoreInstruction(instr) }
|
||||
}
|
||||
@@ -59,8 +59,4 @@ class LocalFlowPropertyProvider extends IRPropertyProvider {
|
||||
result = getNodeProperty(node, key)
|
||||
)
|
||||
}
|
||||
|
||||
override predicate shouldPrintOperand(Operand operand) { not Ssa::ignoreOperand(operand) }
|
||||
|
||||
override predicate shouldPrintInstruction(Instruction instr) { not Ssa::ignoreInstruction(instr) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user