diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll index 325fd6f58b2a..cb757800d65e 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll @@ -20,7 +20,7 @@ private class Swap extends DataFlowFunction, FlowOutBarrierFunction { output.isParameterDeref(0) } - override predicate isFlowOutBarrier(FunctionInput input) { input.isParameterDeref(1) } + override predicate isFlowOutBarrier(FunctionInput input) { input.isParameterDeref([0, 1]) } } /** diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp index eeefa6dd427b..1ca4957b529b 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp @@ -212,7 +212,7 @@ void test_swap() { std::swap(x, y); - sink(x); // $ SPURIOUS: ast,ir + sink(x); // $ SPURIOUS: ast sink(y); // $ ast,ir }