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 {
7272 jrk .getTargetReturnKind ( ) instanceof DataFlowDispatch:: NormalReturnKind
7373 ) )
7474 }
75+
76+ predicate syntheticGlobal = SummaryComponentInternal:: syntheticGlobal / 1 ;
77+
78+ class SyntheticGlobal = SummaryComponentInternal:: SyntheticGlobal ;
7579}
7680
7781class SummaryComponentStack = Impl:: Public:: SummaryComponentStack ;
Original file line number Diff line number Diff line change @@ -180,6 +180,11 @@ module Public {
180180 result = "Argument[" + getParameterPosition ( pos ) + "]"
181181 )
182182 or
183+ exists ( string synthetic |
184+ sc = TSyntheticGlobalSummaryComponent ( synthetic ) and
185+ result = "SyntheticGlobal[" + synthetic + "]"
186+ )
187+ or
183188 sc = TReturnSummaryComponent ( getReturnValueKind ( ) ) and result = "ReturnValue"
184189 }
185190
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ class SummarizedCallableBase extends Callable {
1919 SummarizedCallableBase ( ) { this .isUnboundDeclaration ( ) }
2020}
2121
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+
2229DataFlowCallable inject ( SummarizedCallable c ) { result .asSummarizedCallable ( ) = c }
2330
2431/** Gets the parameter position of the instance parameter. */
You can’t perform that action at this time.
0 commit comments