Skip to content

Commit d20cd3a

Browse files
committed
Convert CTR56-CPP to the new dataflow library
1 parent 3289621 commit d20cd3a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cpp/cert/src/rules/CTR56-CPP/DoNotUsePointerArithmeticOnPolymorphicObjects.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import cpp
2020
import codingstandards.cpp.cert
21-
import semmle.code.cpp.dataflow.DataFlow
21+
import semmle.code.cpp.dataflow.new.DataFlow
2222
import NonFinalClassToPointerArithmeticExprFlow::PathGraph
2323

2424
class ArrayAccessOrPointerArith extends Expr {

cpp/cert/test/rules/CTR56-CPP/DoNotUsePointerArithmeticOnPolymorphicObjects.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnPolymorphicObjects.ql:46,62-70)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnPolymorphicObjects.ql:47,22-30)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnPolymorphicObjects.ql:56,20-28)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnPolymorphicObjects.ql:62,3-11)
51
edges
62
| test.cpp:15:19:15:21 | foo | test.cpp:16:24:16:26 | foo | provenance | |
73
| test.cpp:15:19:15:21 | foo | test.cpp:16:51:16:53 | foo | provenance | |
84
| test.cpp:27:19:27:21 | foo | test.cpp:29:18:29:20 | foo | provenance | |
5+
| test.cpp:40:12:40:19 | new | test.cpp:40:12:40:19 | new | provenance | |
96
| test.cpp:40:12:40:19 | new | test.cpp:43:6:43:7 | l1 | provenance | |
107
| test.cpp:40:12:40:19 | new | test.cpp:44:6:44:7 | l1 | provenance | |
8+
| test.cpp:42:12:42:14 | & ... | test.cpp:42:12:42:14 | & ... | provenance | |
119
| test.cpp:42:12:42:14 | & ... | test.cpp:45:6:45:7 | l3 | provenance | |
1210
| test.cpp:42:12:42:14 | & ... | test.cpp:46:6:46:7 | l3 | provenance | |
1311
| test.cpp:43:6:43:7 | l1 | test.cpp:15:19:15:21 | foo | provenance | |
@@ -21,6 +19,8 @@ nodes
2119
| test.cpp:27:19:27:21 | foo | semmle.label | foo |
2220
| test.cpp:29:18:29:20 | foo | semmle.label | foo |
2321
| test.cpp:40:12:40:19 | new | semmle.label | new |
22+
| test.cpp:40:12:40:19 | new | semmle.label | new |
23+
| test.cpp:42:12:42:14 | & ... | semmle.label | & ... |
2424
| test.cpp:42:12:42:14 | & ... | semmle.label | & ... |
2525
| test.cpp:43:6:43:7 | l1 | semmle.label | l1 |
2626
| test.cpp:44:6:44:7 | l1 | semmle.label | l1 |

0 commit comments

Comments
 (0)