File tree Expand file tree Collapse file tree 5 files changed +37
-0
lines changed
cpp/ql/test/library-tests/fun_decl Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include " fwd.h"
2
+
3
+ void func1 ()
4
+ {
5
+ classA *a = create_an_a ();
6
+ }
7
+
Original file line number Diff line number Diff line change
1
+ #include " fwd.h"
2
+
3
+ class classA {
4
+ public:
5
+ ~classA () { }
6
+ };
7
+
8
+ classA *create_an_a () {
9
+ return new classA;
10
+ }
11
+
12
+ void func2 ()
13
+ {
14
+ classA *a = create_an_a ();
15
+ }
Original file line number Diff line number Diff line change
1
+ class classA ;
2
+ classA *create_an_a (); // permits creation of a classA while it is an incomplete type.
3
+ typedef classA classA_typedef;
Original file line number Diff line number Diff line change
1
+ | compile1.cpp:3:6:3:10 | func1 |
2
+ | compile2.cpp:3:7:3:7 | operator= |
3
+ | compile2.cpp:5:2:5:8 | ~classA |
4
+ | compile2.cpp:8:9:8:19 | create_an_a |
5
+ | compile2.cpp:12:6:12:10 | func2 |
6
+ | file://:0:0:0:0 | operator new |
7
+ | file://:0:0:0:0 | operator= |
8
+ | file://:0:0:0:0 | operator= |
Original file line number Diff line number Diff line change
1
+ import cpp
2
+
3
+ from Function f
4
+ select f
You can’t perform that action at this time.
0 commit comments