Skip to content

Commit 366934f

Browse files
authored
Merge pull request #350 from geoffw0/cpp-205-detail
CPP: Add detail to the CPP-205 test
2 parents 5cd3a9c + ee4cfe8 commit 366934f

File tree

2 files changed

+45
-35
lines changed

2 files changed

+45
-35
lines changed
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
| CPP-205.cpp:0:0:0:0 | CPP-205.cpp |
2-
| CPP-205.cpp:1:20:1:20 | T |
3-
| CPP-205.cpp:1:20:1:20 | definition of T |
4-
| CPP-205.cpp:2:5:2:5 | definition of fn |
5-
| CPP-205.cpp:2:5:2:5 | fn |
6-
| CPP-205.cpp:2:5:2:6 | definition of fn |
7-
| CPP-205.cpp:2:5:2:6 | fn |
8-
| CPP-205.cpp:2:10:2:12 | definition of out |
9-
| CPP-205.cpp:2:10:2:12 | definition of out |
10-
| CPP-205.cpp:2:10:2:12 | out |
11-
| CPP-205.cpp:2:10:2:12 | out |
12-
| CPP-205.cpp:2:15:5:1 | { ... } |
13-
| CPP-205.cpp:2:15:5:1 | { ... } |
14-
| CPP-205.cpp:3:3:3:33 | declaration |
15-
| CPP-205.cpp:3:3:3:33 | declaration |
16-
| CPP-205.cpp:3:15:3:15 | declaration of y |
17-
| CPP-205.cpp:3:15:3:15 | y |
18-
| CPP-205.cpp:3:17:3:31 | 5 |
19-
| CPP-205.cpp:4:3:4:11 | return ... |
20-
| CPP-205.cpp:4:3:4:11 | return ... |
21-
| CPP-205.cpp:4:10:4:10 | 0 |
22-
| CPP-205.cpp:4:10:4:10 | 0 |
23-
| CPP-205.cpp:7:5:7:8 | definition of main |
24-
| CPP-205.cpp:7:5:7:8 | main |
25-
| CPP-205.cpp:7:12:9:1 | { ... } |
26-
| CPP-205.cpp:8:3:8:15 | return ... |
27-
| CPP-205.cpp:8:10:8:11 | call to fn |
28-
| CPP-205.cpp:8:13:8:13 | 0 |
29-
| file://:0:0:0:0 | __va_list_tag |
30-
| file://:0:0:0:0 | operator= |
31-
| file://:0:0:0:0 | operator= |
32-
| file://:0:0:0:0 | p#0 |
33-
| file://:0:0:0:0 | p#0 |
34-
| file://:0:0:0:0 | y |
1+
| CPP-205.cpp:0:0:0:0 | CPP-205.cpp | |
2+
| CPP-205.cpp:1:20:1:20 | T | |
3+
| CPP-205.cpp:1:20:1:20 | definition of T | |
4+
| CPP-205.cpp:2:5:2:5 | definition of fn | function declaration entry for fn<int>(int) -> int |
5+
| CPP-205.cpp:2:5:2:5 | fn | function fn<int>(int) -> int |
6+
| CPP-205.cpp:2:5:2:6 | definition of fn | function declaration entry for fn<T>(T) -> int |
7+
| CPP-205.cpp:2:5:2:6 | fn | function fn<T>(T) -> int |
8+
| CPP-205.cpp:2:10:2:12 | definition of out | parameter declaration entry for fn<T>(T) -> int |
9+
| CPP-205.cpp:2:10:2:12 | definition of out | parameter declaration entry for fn<int>(int) -> int |
10+
| CPP-205.cpp:2:10:2:12 | out | parameter for fn<T>(T) -> int |
11+
| CPP-205.cpp:2:10:2:12 | out | parameter for fn<int>(int) -> int |
12+
| CPP-205.cpp:2:15:5:1 | { ... } | |
13+
| CPP-205.cpp:2:15:5:1 | { ... } | |
14+
| CPP-205.cpp:3:3:3:33 | declaration | |
15+
| CPP-205.cpp:3:3:3:33 | declaration | |
16+
| CPP-205.cpp:3:15:3:15 | declaration of y | |
17+
| CPP-205.cpp:3:15:3:15 | y | |
18+
| CPP-205.cpp:3:17:3:31 | 5 | |
19+
| CPP-205.cpp:4:3:4:11 | return ... | |
20+
| CPP-205.cpp:4:3:4:11 | return ... | |
21+
| CPP-205.cpp:4:10:4:10 | 0 | |
22+
| CPP-205.cpp:4:10:4:10 | 0 | |
23+
| CPP-205.cpp:7:5:7:8 | definition of main | function declaration entry for main() -> int |
24+
| CPP-205.cpp:7:5:7:8 | main | function main() -> int |
25+
| CPP-205.cpp:7:12:9:1 | { ... } | |
26+
| CPP-205.cpp:8:3:8:15 | return ... | |
27+
| CPP-205.cpp:8:10:8:11 | call to fn | |
28+
| CPP-205.cpp:8:13:8:13 | 0 | |
29+
| file://:0:0:0:0 | __va_list_tag | |
30+
| file://:0:0:0:0 | operator= | function __va_list_tag::operator=(__va_list_tag &&) -> __va_list_tag & |
31+
| file://:0:0:0:0 | operator= | function __va_list_tag::operator=(const __va_list_tag &) -> __va_list_tag & |
32+
| file://:0:0:0:0 | p#0 | parameter for __va_list_tag::operator=(__va_list_tag &&) -> __va_list_tag & |
33+
| file://:0:0:0:0 | p#0 | parameter for __va_list_tag::operator=(const __va_list_tag &) -> __va_list_tag & |
34+
| file://:0:0:0:0 | y | |
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import cpp
22

3+
string describe(Element e) {
4+
result = "function " + e.(Function).getFullSignature()
5+
or
6+
result = "function declaration entry for " + e.(FunctionDeclarationEntry).getFunction().getFullSignature()
7+
or
8+
result = "parameter for " + e.(Parameter).getFunction().getFullSignature()
9+
or
10+
result = "parameter declaration entry for " + e.(ParameterDeclarationEntry).getFunctionDeclarationEntry().getFunction().getFullSignature()
11+
}
12+
313
from Element e
414
where not e.getLocation() instanceof UnknownLocation
515
and not e instanceof Folder
6-
select e
16+
select e, concat(describe(e), ", ")

0 commit comments

Comments
 (0)