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

Skip to content

Commit 58737b1

Browse files
committed
C++: We *could* support .Argument with no index, but I'm not convinced we can do so efficiently, so lets not.
1 parent 0a33a6e commit 58737b1

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
* - `n1..n2` syntax can be used to indicate a range of arguments, inclusive
4040
* at both ends. One or more "*" can be added in front of the range to
4141
* indicate indirection on all arguments in the range, for example `*n1..n2`.
42-
* - "Argument" can be specified without any "[]". In this case, any argument
43-
* is accepted.
4442
* - "ReturnValue": Selects a value being returned by the selected element.
4543
* One or more "*" can be added as an argument to indicate indirection, for
4644
* example, "ReturnValue[*]" indicates the first indirection of the return
@@ -58,8 +56,6 @@
5856
* - `n1..n2` syntax can be used to indicate a range of arguments, inclusive
5957
* at both ends. One or more "*" can be added in front of the range to
6058
* indicate indirection on all arguments in the range, for example `*n1..n2`.
61-
* - "Argument" can be specified without any "[]". In this case, any argument
62-
* is accepted.
6359
* - "Parameter[n]": Selects the value of a parameter of the selected element.
6460
* The syntax is the same as for "Argument", for example "Parameter[0]",
6561
* "Parameter[*0]", "Parameter[0..2]" etc.

cpp/ql/test/library-tests/dataflow/models-as-data/testModels.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private class TestSummaries extends SummaryModelCsv {
7878
";;false;madArg0ToArg1Indirect;;;Argument[0];Argument[*1];taint",
7979
";;false;madArg0IndirectToArg1Indirect;;;Argument[*0];Argument[*1];taint",
8080
";;false;madArgsComplex;;;Argument[*0..1,2];ReturnValue;taint",
81-
";;false;madArgsAny;;;Argument;ReturnValue;taint",
81+
";;false;madArgsAny;;;Argument;ReturnValue;taint", // (syntax not supported)
8282
";;false;madArg0FieldToReturn;;;Argument[0].value;ReturnValue;taint",
8383
";;false;madArg0IndirectFieldToReturn;;;Argument[*0].value;ReturnValue;taint",
8484
";;false;madArg0FieldIndirectToReturn;;;Argument[0].ptr[*];ReturnValue;taint",

cpp/ql/test/library-tests/dataflow/models-as-data/tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ void test_summaries() {
186186
sink(madArgsComplex(0, 0, 0, source()));
187187

188188
sink(madArgsAny(0, 0));
189-
sink(madArgsAny(source(), 0)); // $ MISSING: ir
190-
sink(madArgsAny(0, sourcePtr())); // $ MISSING: ir
191-
sink(madArgsAny(0, sourceIndirect())); // $ MISSING: ir
189+
sink(madArgsAny(source(), 0)); // (syntax not supported)
190+
sink(madArgsAny(0, sourcePtr())); // (syntax not supported)
191+
sink(madArgsAny(0, sourceIndirect())); // (syntax not supported)
192192

193193
// test summaries involving structs / fields
194194

0 commit comments

Comments
 (0)