@@ -63,37 +63,51 @@ predicate sourceElement(AstNode n, string output, string kind) { none() }
63
63
*/
64
64
predicate sinkElement ( AstNode n , string input , string kind ) { none ( ) }
65
65
66
- /** Gets the summary component for specification component `c`, if any. */
66
+ /**
67
+ * Gets the summary component for specification component `c`, if any.
68
+ *
69
+ * This covers all the Ruby-specific components of a flow summary, and
70
+ * is currently restricted to `"BlockArgument"`.
71
+ */
67
72
SummaryComponent interpretComponentSpecific ( string c ) {
68
73
c = "BlockArgument" and
69
74
result = FlowSummary:: SummaryComponent:: block ( )
70
75
}
71
76
72
- class SourceOrSinkElement = AstNode ;
73
-
74
77
/** Gets the return kind corresponding to specification `"ReturnValue"`. */
75
78
NormalReturnKind getReturnValueKind ( ) { any ( ) }
76
79
77
- /** An entity used to interpret a source/sink specification. */
78
- class InterpretNode extends AstNode {
79
- /** Gets the element that this node corresponds to, if any. */
80
- SourceOrSinkElement asElement ( ) { none ( ) }
80
+ /**
81
+ * All definitions in this module are required by the shared implementation
82
+ * (for source/sink interpretation), but they are unused for Ruby, where
83
+ * we rely on API graphs instead.
84
+ */
85
+ private module UnusedSourceSinkInterpretation {
86
+ class SourceOrSinkElement = AstNode ;
81
87
82
- /** Gets the data-flow node that this node corresponds to, if any. */
83
- Node asNode ( ) { none ( ) }
88
+ /** An entity used to interpret a source/sink specification. */
89
+ class InterpretNode extends AstNode {
90
+ /** Gets the element that this node corresponds to, if any. */
91
+ SourceOrSinkElement asElement ( ) { none ( ) }
84
92
85
- /** Gets the call that this node corresponds to, if any. */
86
- DataFlowCall asCall ( ) { none ( ) }
93
+ /** Gets the data-flow node that this node corresponds to, if any. */
94
+ Node asNode ( ) { none ( ) }
87
95
88
- /** Gets the callable that this node corresponds to, if any. */
89
- DataFlowCallable asCallable ( ) { none ( ) }
96
+ /** Gets the call that this node corresponds to, if any. */
97
+ DataFlowCall asCall ( ) { none ( ) }
90
98
91
- /** Gets the target of this call, if any. */
92
- Callable getCallTarget ( ) { none ( ) }
93
- }
99
+ /** Gets the callable that this node corresponds to, if any. */
100
+ DataFlowCallable asCallable ( ) { none ( ) }
101
+
102
+ /** Gets the target of this call, if any. */
103
+ Callable getCallTarget ( ) { none ( ) }
104
+ }
94
105
95
- /** Provides additional sink specification logic required for attributes. */
96
- predicate interpretOutputSpecific ( string c , InterpretNode mid , InterpretNode node ) { none ( ) }
106
+ /** Provides additional sink specification logic. */
107
+ predicate interpretOutputSpecific ( string c , InterpretNode mid , InterpretNode node ) { none ( ) }
108
+
109
+ /** Provides additional source specification logic. */
110
+ predicate interpretInputSpecific ( string c , InterpretNode mid , InterpretNode node ) { none ( ) }
111
+ }
97
112
98
- /** Provides additional sink specification logic required for attributes. */
99
- predicate interpretInputSpecific ( string c , InterpretNode mid , InterpretNode n ) { none ( ) }
113
+ import UnusedSourceSinkInterpretation
0 commit comments