File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ signature module ConfigSig {
4646 */
4747 default predicate allowImplicitRead ( Node node , ContentSet c ) { none ( ) }
4848
49+ /**
50+ * Holds if `node` should never be skipped over in the `PathGraph` and in path
51+ * explanations.
52+ */
53+ default predicate neverSkip ( Node node ) {
54+ isAdditionalFlowStep ( node , _) or isAdditionalFlowStep ( _, node )
55+ }
56+
4957 /**
5058 * Gets the virtual dispatch branching limit when calculating field flow.
5159 * This can be overridden to a smaller value to improve performance (a
@@ -141,6 +149,17 @@ signature module StateConfigSig {
141149 */
142150 default predicate allowImplicitRead ( Node node , ContentSet c ) { none ( ) }
143151
152+ /**
153+ * Holds if `node` should never be skipped over in the `PathGraph` and in path
154+ * explanations.
155+ */
156+ default predicate neverSkip ( Node node ) {
157+ isAdditionalFlowStep ( node , _) or
158+ isAdditionalFlowStep ( _, node ) or
159+ isAdditionalFlowStep ( node , _, _, _) or
160+ isAdditionalFlowStep ( _, _, node , _)
161+ }
162+
144163 /**
145164 * Gets the virtual dispatch branching limit when calculating field flow.
146165 * This can be overridden to a smaller value to improve performance (a
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ signature module FullStateConfigSig {
6666 */
6767 predicate allowImplicitRead ( Node node , ContentSet c ) ;
6868
69+ /**
70+ * Holds if `node` should never be skipped over in the `PathGraph` and in path
71+ * explanations.
72+ */
73+ predicate neverSkip ( Node node ) ;
74+
6975 /**
7076 * Gets the virtual dispatch branching limit when calculating field flow.
7177 * This can be overridden to a smaller value to improve performance (a
@@ -2024,7 +2030,8 @@ module Impl<FullStateConfigSig Config> {
20242030 castNode ( this .asNode ( ) ) or
20252031 clearsContentCached ( this .asNode ( ) , _) or
20262032 expectsContentCached ( this .asNode ( ) , _) or
2027- neverSkipInPathGraph ( this .asNode ( ) )
2033+ neverSkipInPathGraph ( this .asNode ( ) ) or
2034+ Config:: neverSkip ( this .asNode ( ) )
20282035 }
20292036 }
20302037
Original file line number Diff line number Diff line change @@ -313,6 +313,8 @@ private module Config implements FullStateConfigSig {
313313 any ( Configuration config ) .allowImplicitRead ( node , c )
314314 }
315315
316+ predicate neverSkip ( Node node ) { none ( ) }
317+
316318 int fieldFlowBranchLimit ( ) { result = min ( any ( Configuration config ) .fieldFlowBranchLimit ( ) ) }
317319
318320 FlowFeature getAFeature ( ) { result = any ( Configuration config ) .getAFeature ( ) }
You can’t perform that action at this time.
0 commit comments