From b5a2f5d3ff16151b75f3fd1c7545d82adce1a602 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 6 Mar 2025 10:05:31 +0100 Subject: [PATCH] C++: Remove useless ipa wrapper. --- .../ir/dataflow/internal/DataFlowPrivate.qll | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll index 304eaf829a5..f6371e5b696 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll @@ -1834,43 +1834,15 @@ module IteratorFlow { private module IteratorSsa = SsaImpl::Make; - cached - private newtype TSsaDef = TDef(IteratorSsa::DefinitionExt def) - - abstract private class SsaDef extends TSsaDef { - /** Gets a textual representation of this element. */ - string toString() { none() } - - /** Gets the underlying non-phi definition or use. */ - IteratorSsa::DefinitionExt asDef() { none() } - - /** Gets the underlying phi node. */ - PhiNode asPhi() { none() } - - /** Gets the location of this element. */ - abstract Location getLocation(); - } - - private class Def extends TDef, SsaDef { - IteratorSsa::DefinitionExt def; - - Def() { this = TDef(def) } - - final override IteratorSsa::DefinitionExt asDef() { result = def } - + private class Def extends IteratorSsa::DefinitionExt { final override Location getLocation() { result = this.getImpl().getLocation() } - /** Gets the variable written to by this definition. */ - final SourceVariable getSourceVariable() { result = def.getSourceVariable() } - - override string toString() { result = def.toString() } - /** * Holds if this definition (or use) has index `index` in block `block`, * and is a definition (or use) of the variable `sv`. */ predicate hasIndexInBlock(IRBlock block, int index, SourceVariable sv) { - def.definesAt(sv, block, index, _) + super.definesAt(sv, block, index, _) } private Ssa::DefImpl getImpl() {