Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc42e2b

Browse files
committed
C++: Workaround to get the tests passing again.
1 parent 5787dcc commit bc42e2b

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ module Input implements InputSig<DataFlowImplSpecific::CppDataFlow> {
6565
private import Make<DataFlowImplSpecific::CppDataFlow, Input> as Impl
6666

6767
private module StepsInput implements Impl::Private::StepsInputSig {
68-
DataFlowCall getACall(Public::SummarizedCallable sc) { result.getStaticCallTarget() = TSummarizedCallable(sc) }
68+
DataFlowCall getACall(Public::SummarizedCallable sc) {
69+
result.getStaticCallTarget().asSourceCallable() = sc or
70+
result.getStaticCallTarget().asSummarizedCallable() = sc // TODO: this should be the only case
71+
}
6972
}
7073

7174
module SourceSinkInterpretationInput implements
@@ -114,7 +117,8 @@ module SourceSinkInterpretationInput implements
114117
Node asNode() { this = TNode_(result) }
115118

116119
/** Gets the call that this node corresponds to, if any. */
117-
DataFlowCall asCall() { this.asElement() = result.asCallInstruction().getUnconvertedResultExpression()
120+
DataFlowCall asCall() {
121+
this.asElement() = result.asCallInstruction().getUnconvertedResultExpression()
118122
// TODO: or summary call?
119123
}
120124

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ class CastNode extends Node {
951951

952952
cached
953953
newtype TDataFlowCallable =
954-
TSourceCallable(Cpp::Declaration decl) { not decl instanceof FlowSummaryImpl::Public::SummarizedCallable } or
954+
TSourceCallable(Cpp::Declaration decl) /*{ not decl instanceof FlowSummaryImpl::Public::SummarizedCallable }*/ or // TODO: figure this out
955955
TSummarizedCallable(FlowSummaryImpl::Public::SummarizedCallable c)
956956

957957
/**

0 commit comments

Comments
 (0)