Swift: Fix for OptionSet.

This commit is contained in:
Geoffrey White
2024-11-28 18:14:04 +00:00
parent e08eac03d8
commit 1fc112e7a7
2 changed files with 4 additions and 3 deletions

View File

@@ -12,7 +12,10 @@ private import codeql.swift.dataflow.FlowSteps
*/
private class RawRepresentableSummaries extends SummaryModelCsv {
override predicate row(string row) {
row = ";RawRepresentable;true;init(rawValue:);;;Argument[0];ReturnValue;taint"
row = [
";RawRepresentable;true;init(rawValue:);;;Argument[0];ReturnValue;taint",
";OptionSet;true;init(rawValue:);;;Argument[0];ReturnValue;taint"
]
}
}

View File

@@ -1,4 +1,2 @@
testFailures
| optionset.swift:60:49:61:1 | // $ tainted=60\n | Missing result: tainted=60 |
| optionset.swift:65:58:66:1 | // $ tainted=65\n | Missing result: tainted=65 |
failures