Skip to content

Commit

Permalink
C++: Extend template member test to better test on-demand indexing of…
Browse files Browse the repository at this point in the history
… special member functions.
  • Loading branch information
sashabu committed Jul 12, 2024
1 parent 18d9310 commit b3b04b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions cpp/ql/test/library-tests/members/templates/c1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
static void f(void) {
CA::CB<int> x;
CA::CB<float> y;

x.operator=(x);
x.operator=(static_cast<CA::CB<int>&&>(x));
}
6 changes: 2 additions & 4 deletions cpp/ql/test/library-tests/members/templates/members.expected
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
| h.h:2:7:2:8 | CA | 1 CA::operator= |
| h.h:2:7:2:8 | CA | 2 CA::operator= |
| h.h:5:11:5:12 | CB<TB> | <none> |
| h.h:5:11:5:12 | CB<double> | 0 CA::CB<double>::operator= |
| h.h:5:11:5:12 | CB<double> | 1 CA::CB<double>::operator= |
| h.h:5:11:5:12 | CB<float> | 0 CA::CB<float>::operator= |
| h.h:5:11:5:12 | CB<float> | 1 CA::CB<float>::operator= |
| h.h:5:11:5:12 | CB<double> | <none> |
| h.h:5:11:5:12 | CB<float> | <none> |
| h.h:5:11:5:12 | CB<int> | 0 CA::CB<int>::operator= |
| h.h:5:11:5:12 | CB<int> | 1 CA::CB<int>::operator= |

0 comments on commit b3b04b4

Please sign in to comment.