File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
cpp/ql/test/library-tests/templates/nontype_instantiations/general Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ // semmle-extractor-options: --edg --trap_container=folder --edg --trap-compression=none
2+ template <int x>
3+ struct C { };
4+
5+ static const int one1 = 1 , one2 = 1 ;
6+ C<one1> c = C<one2>();
7+ C<one1 + one2> e;
8+
9+ template <typename T, T X>
10+ struct D { };
11+
12+ D<int , 2 > a;
13+ D<long , 2 > b;
14+
15+ template <typename T, T* X>
16+ struct E { };
17+
18+ E<int , nullptr > z;
19+
Original file line number Diff line number Diff line change 1+ | test.cpp:3:8:3:8 | C<1> | file://:0:0:0:0 | int | test.cpp:5:25:5:25 | 1 |
2+ | test.cpp:3:8:3:8 | C<2> | file://:0:0:0:0 | int | file://:0:0:0:0 | 2 |
3+ | test.cpp:3:8:3:8 | C<x> | file://:0:0:0:0 | int | file://:0:0:0:0 | x |
4+ | test.cpp:10:8:10:8 | D<T, X> | test.cpp:9:19:9:19 | T | file://:0:0:0:0 | X |
5+ | test.cpp:10:8:10:8 | D<int, 2> | file://:0:0:0:0 | int | test.cpp:12:8:12:8 | 2 |
6+ | test.cpp:10:8:10:8 | D<long, 2L> | file://:0:0:0:0 | long | file://:0:0:0:0 | 2 |
7+ | test.cpp:16:8:16:8 | E<T, X> | file://:0:0:0:0 | T * | file://:0:0:0:0 | X |
8+ | test.cpp:16:8:16:8 | E<T, X> | test.cpp:15:19:15:19 | T | file://:0:0:0:0 | X |
9+ | test.cpp:16:8:16:8 | E<int, (int *)nullptr> | file://:0:0:0:0 | int | file://:0:0:0:0 | 0 |
10+ | test.cpp:16:8:16:8 | E<int, (int *)nullptr> | file://:0:0:0:0 | int * | file://:0:0:0:0 | 0 |
Original file line number Diff line number Diff line change 1+ import cpp
2+
3+ from Declaration d
4+ select d , d .getATemplateArgument ( ) , d .getATemplateArgumentValue ( )
You can’t perform that action at this time.
0 commit comments