C++: Workaround to get the tests passing again.

This commit is contained in:
Geoffrey White
2024-02-27 16:41:39 +00:00
parent 5787dcc82d
commit bc42e2bc35
2 changed files with 7 additions and 3 deletions

View File

@@ -65,7 +65,10 @@ module Input implements InputSig<DataFlowImplSpecific::CppDataFlow> {
private import Make<DataFlowImplSpecific::CppDataFlow, Input> as Impl
private module StepsInput implements Impl::Private::StepsInputSig {
DataFlowCall getACall(Public::SummarizedCallable sc) { result.getStaticCallTarget() = TSummarizedCallable(sc) }
DataFlowCall getACall(Public::SummarizedCallable sc) {
result.getStaticCallTarget().asSourceCallable() = sc or
result.getStaticCallTarget().asSummarizedCallable() = sc // TODO: this should be the only case
}
}
module SourceSinkInterpretationInput implements
@@ -114,7 +117,8 @@ module SourceSinkInterpretationInput implements
Node asNode() { this = TNode_(result) }
/** Gets the call that this node corresponds to, if any. */
DataFlowCall asCall() { this.asElement() = result.asCallInstruction().getUnconvertedResultExpression()
DataFlowCall asCall() {
this.asElement() = result.asCallInstruction().getUnconvertedResultExpression()
// TODO: or summary call?
}

View File

@@ -951,7 +951,7 @@ class CastNode extends Node {
cached
newtype TDataFlowCallable =
TSourceCallable(Cpp::Declaration decl) { not decl instanceof FlowSummaryImpl::Public::SummarizedCallable } or
TSourceCallable(Cpp::Declaration decl) /*{ not decl instanceof FlowSummaryImpl::Public::SummarizedCallable }*/ or // TODO: figure this out
TSummarizedCallable(FlowSummaryImpl::Public::SummarizedCallable c)
/**