C#/Java: Exclude summaries using callbacks in fields, properties and synthetic fields.

This commit is contained in:
Michael Nebel
2024-10-29 09:26:01 +01:00
parent 5c389355d0
commit 55cfbccd43
4 changed files with 36 additions and 0 deletions

View File

@@ -318,6 +318,10 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, CsharpDat
c.isField(_) or c.isSyntheticField(_) or c.isProperty(_)
}
predicate isCallback(DataFlow::ContentSet c) {
c.isDelegateCallArgument(_) or c.isDelegateCallReturn()
}
string getSyntheticName(DataFlow::ContentSet c) {
exists(CS::Field f |
not f.isEffectivelyPublic() and