File tree Expand file tree Collapse file tree
lib/semmle/code/cpp/dataflow/internal
test/library-tests/dataflow/models-as-data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ module SourceSinkInterpretationInput implements
166166 c = "" and
167167 e .getQualifier ( ) = n .asExpr ( )
168168 or
169- // Allow variables (without a qualifier) to be picked as input nodes.
169+ // Allow variables to be picked as input nodes.
170170 // We could simply do this as `e = n.asExpr()`, but that would not allow
171171 // us to pick `x` as a sink in an example such as `x = source()` (but
172172 // only subsequent uses of `x`) since the variable access on `x` doesn't
@@ -175,7 +175,6 @@ module SourceSinkInterpretationInput implements
175175 // expression associated with the destination instruction. This means
176176 // that the `x` in `x = source()` can be marked as an input.
177177 c = "" and
178- not exists ( e .getQualifier ( ) ) and
179178 exists ( StoreInstruction store |
180179 store .getDestinationAddress ( ) .getUnconvertedResultExpression ( ) = e and
181180 n .asInstruction ( ) = store
Original file line number Diff line number Diff line change @@ -239,11 +239,11 @@ void test_class_members() {
239239
240240 mc.memberMadSinkArg0 (source ()); // $ ir
241241
242- mc.memberMadSinkVar = source (); // $ MISSING: ir
242+ mc.memberMadSinkVar = source (); // $ ir
243243
244244 mnc.namespaceMemberMadSinkArg0 (source ()); // $ ir
245245 MyNamespace::MyClass::namespaceStaticMemberMadSinkArg0 (source ()); // $ ir
246- mnc.namespaceMemberMadSinkVar = source (); // $ MISSING: ir
246+ mnc.namespaceMemberMadSinkVar = source (); // $ ir
247247 MyNamespace::MyClass::namespaceStaticMemberMadSinkVar = source (); // $ ir
248248
249249 // test class member summaries
You can’t perform that action at this time.
0 commit comments