mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Simplify logic to an implication
This commit is contained in:
@@ -51,9 +51,7 @@ private module Cached {
|
||||
|
||||
cached
|
||||
predicate hasInstruction(TStageInstruction instr) {
|
||||
instr instanceof TRawInstruction and instr instanceof OldInstruction
|
||||
or
|
||||
not instr instanceof TRawInstruction
|
||||
instr instanceof TRawInstruction implies instr instanceof OldInstruction
|
||||
}
|
||||
|
||||
private IRBlock getNewBlock(OldBlock oldBlock) {
|
||||
|
||||
@@ -51,9 +51,7 @@ private module Cached {
|
||||
|
||||
cached
|
||||
predicate hasInstruction(TStageInstruction instr) {
|
||||
instr instanceof TRawInstruction and instr instanceof OldInstruction
|
||||
or
|
||||
not instr instanceof TRawInstruction
|
||||
instr instanceof TRawInstruction implies instr instanceof OldInstruction
|
||||
}
|
||||
|
||||
private IRBlock getNewBlock(OldBlock oldBlock) {
|
||||
|
||||
Reference in New Issue
Block a user