C++: Add new test case for template member change

We now output literals for accesses to members of template parameters:

So for `foo` in the following example:

```
template<typename T> void bar(T& t) {
  T.foo(1)
}
```
This commit is contained in:
Matthew Gretton-Dann
2019-11-07 10:35:26 +00:00
parent c0884e9a88
commit ddf1ef8a7d
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
class A {
public:
void foo();
int k;
};
class B {
public:
template <typename T>
B(T x) {
int k = x.k;
x.foo();
}
};
A a;
B b(a);

View File

@@ -0,0 +1,2 @@
| test.cpp:13:15:13:15 | k |
| test.cpp:14:7:14:9 | foo |

View File

@@ -0,0 +1,4 @@
import cpp
from Literal l
select l