mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
Fix edge case in MaD validation
If the db contains no pointer types then we were getting spurious model validation errors.
This commit is contained in:
@@ -153,7 +153,10 @@ module ModelValidation {
|
||||
not part = "" and
|
||||
not (part = "Argument" and pred = "sink") and
|
||||
not parseArg(part, _) and
|
||||
not part.getName() = "Field"
|
||||
// If the database does not contain any fields/pointer types then no
|
||||
// FieldContent/PointerContent exists, so we spuriously think that
|
||||
// these spec components are invalid.
|
||||
not part.getName() = ["Field", "Dereference"]
|
||||
or
|
||||
part = input.getToken(0) and
|
||||
parseParam(part, _)
|
||||
@@ -176,7 +179,10 @@ module ModelValidation {
|
||||
invalidSpecComponent(output, part) and
|
||||
not part = "" and
|
||||
not (part = ["Argument", "Parameter"] and pred = "source") and
|
||||
not part.getName() = "Field"
|
||||
// If the database does not contain any fields/pointer types then no
|
||||
// FieldContent/PointerContent exists, so we spuriously think that
|
||||
// these spec components are invalid.
|
||||
not part.getName() = ["Field", "Dereference"]
|
||||
or
|
||||
invalidIndexComponent(output, part)
|
||||
) and
|
||||
|
||||
Reference in New Issue
Block a user