File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ module SummaryComponent {
72
72
jrk .getTargetReturnKind ( ) instanceof DataFlowDispatch:: NormalReturnKind
73
73
) )
74
74
}
75
+
76
+ predicate syntheticGlobal = SummaryComponentInternal:: syntheticGlobal / 1 ;
77
+
78
+ class SyntheticGlobal = SummaryComponentInternal:: SyntheticGlobal ;
75
79
}
76
80
77
81
class SummaryComponentStack = Impl:: Public:: SummaryComponentStack ;
Original file line number Diff line number Diff line change @@ -180,6 +180,11 @@ module Public {
180
180
result = "Argument[" + getParameterPosition ( pos ) + "]"
181
181
)
182
182
or
183
+ exists ( string synthetic |
184
+ sc = TSyntheticGlobalSummaryComponent ( synthetic ) and
185
+ result = "SyntheticGlobal[" + synthetic + "]"
186
+ )
187
+ or
183
188
sc = TReturnSummaryComponent ( getReturnValueKind ( ) ) and result = "ReturnValue"
184
189
}
185
190
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ class SummarizedCallableBase extends Callable {
19
19
SummarizedCallableBase ( ) { this .isUnboundDeclaration ( ) }
20
20
}
21
21
22
+ /**
23
+ * A module for importing frameworks that define synthetic globals.
24
+ */
25
+ private module SyntheticGlobals {
26
+ private import semmle.code.csharp.frameworks.EntityFramework
27
+ }
28
+
22
29
DataFlowCallable inject ( SummarizedCallable c ) { result .asSummarizedCallable ( ) = c }
23
30
24
31
/** Gets the parameter position of the instance parameter. */
You can’t perform that action at this time.
0 commit comments