Skip to content

Commit 37f30d3

Browse files
authored
Merge pull request github#3385 from jbj/dataflow-remove-from-post
C++: Remove an unneeded local-flow case
2 parents 33f4503 + 36bdcfa commit 37f30d3

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,6 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
496496
// Expr -> Expr
497497
exprToExprStep_nocfg(nodeFrom.asExpr(), nodeTo.asExpr())
498498
or
499-
exprToExprStep_nocfg(nodeFrom.(PostUpdateNode).getPreUpdateNode().asExpr(), nodeTo.asExpr())
500-
or
501499
// Node -> FlowVar -> VariableAccess
502500
exists(FlowVar var |
503501
(

cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
| test.cpp:383:12:383:13 | 0 | test.cpp:384:33:384:35 | tmp |
4545
| test.cpp:383:12:383:13 | 0 | test.cpp:385:8:385:10 | tmp |
4646
| test.cpp:384:10:384:13 | & ... | test.cpp:384:3:384:8 | call to memcpy |
47-
| test.cpp:384:10:384:13 | ref arg & ... | test.cpp:384:3:384:8 | call to memcpy |
4847
| test.cpp:384:10:384:13 | ref arg & ... | test.cpp:384:33:384:35 | tmp |
4948
| test.cpp:384:10:384:13 | ref arg & ... | test.cpp:385:8:385:10 | tmp |
5049
| test.cpp:384:11:384:13 | tmp | test.cpp:384:10:384:13 | & ... |
@@ -59,7 +58,6 @@
5958
| test.cpp:389:12:389:13 | 0 | test.cpp:394:10:394:12 | tmp |
6059
| test.cpp:390:19:390:21 | tmp | test.cpp:390:18:390:21 | & ... |
6160
| test.cpp:391:10:391:13 | & ... | test.cpp:391:3:391:8 | call to memcpy |
62-
| test.cpp:391:10:391:13 | ref arg & ... | test.cpp:391:3:391:8 | call to memcpy |
6361
| test.cpp:391:10:391:13 | ref arg & ... | test.cpp:391:33:391:35 | tmp |
6462
| test.cpp:391:10:391:13 | ref arg & ... | test.cpp:392:8:392:10 | tmp |
6563
| test.cpp:391:10:391:13 | ref arg & ... | test.cpp:394:10:394:12 | tmp |

cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@
299299
| taint.cpp:165:24:165:24 | 0 | taint.cpp:165:22:165:25 | {...} | TAINT |
300300
| taint.cpp:168:8:168:14 | ref arg tainted | taint.cpp:172:18:172:24 | tainted | |
301301
| taint.cpp:170:10:170:15 | buffer | taint.cpp:170:3:170:8 | call to strcpy | |
302-
| taint.cpp:170:10:170:15 | ref arg buffer | taint.cpp:170:3:170:8 | call to strcpy | |
303302
| taint.cpp:170:10:170:15 | ref arg buffer | taint.cpp:171:8:171:13 | buffer | |
304303
| taint.cpp:170:10:170:15 | ref arg buffer | taint.cpp:172:10:172:15 | buffer | |
305304
| taint.cpp:170:10:170:15 | ref arg buffer | taint.cpp:173:8:173:13 | buffer | |
@@ -309,7 +308,6 @@
309308
| taint.cpp:171:8:171:13 | ref arg buffer | taint.cpp:173:8:173:13 | buffer | |
310309
| taint.cpp:172:10:172:15 | buffer | taint.cpp:172:3:172:8 | call to strcat | |
311310
| taint.cpp:172:10:172:15 | buffer | taint.cpp:172:10:172:15 | ref arg buffer | TAINT |
312-
| taint.cpp:172:10:172:15 | ref arg buffer | taint.cpp:172:3:172:8 | call to strcat | |
313311
| taint.cpp:172:10:172:15 | ref arg buffer | taint.cpp:173:8:173:13 | buffer | |
314312
| taint.cpp:172:18:172:24 | tainted | taint.cpp:172:10:172:15 | ref arg buffer | TAINT |
315313
| taint.cpp:180:19:180:19 | p | taint.cpp:181:9:181:9 | p | |
@@ -320,7 +318,6 @@
320318
| taint.cpp:193:6:193:6 | x | taint.cpp:194:10:194:10 | x | |
321319
| taint.cpp:193:6:193:6 | x | taint.cpp:195:7:195:7 | x | |
322320
| taint.cpp:194:9:194:10 | & ... | taint.cpp:194:2:194:7 | call to memcpy | |
323-
| taint.cpp:194:9:194:10 | ref arg & ... | taint.cpp:194:2:194:7 | call to memcpy | |
324321
| taint.cpp:194:9:194:10 | ref arg & ... | taint.cpp:195:7:195:7 | x | |
325322
| taint.cpp:194:10:194:10 | x | taint.cpp:194:9:194:10 | & ... | |
326323
| taint.cpp:194:13:194:18 | source | taint.cpp:194:2:194:7 | call to memcpy | TAINT |

0 commit comments

Comments
 (0)