mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: Enhance a test
This commit is contained in:
@@ -48,3 +48,26 @@ void templateFunctionUser(signed int x, unsigned int y) {
|
||||
twiceUsedTemplateFunction(y);
|
||||
}
|
||||
|
||||
class C {
|
||||
public:
|
||||
int ff() {
|
||||
int i;
|
||||
gg(i);
|
||||
}
|
||||
// Although there is a declaration of gg starting here,
|
||||
// the number of lines count shouldn't.
|
||||
template<typename T>
|
||||
void gg(T t);
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<typename T>
|
||||
void C::gg(T t) {
|
||||
;
|
||||
}
|
||||
void hh() {
|
||||
C n;
|
||||
n.ff();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
| C::ff() | 4 | 4 | 0 |
|
||||
| C::gg<T>(T) | 4 | 4 | 0 |
|
||||
| C::gg<T>(T) | 10 | 7 | 0 |
|
||||
| conventional() | 4 | 4 | 1 |
|
||||
| hh() | 4 | 4 | 0 |
|
||||
| long_char() | 3 | 3 | 0 |
|
||||
| long_string() | 5 | 5 | 0 |
|
||||
| misleading_comment() | 7 | 2 | 5 |
|
||||
| numlines | 50 | 37 | 6 |
|
||||
| numlines | 73 | 54 | 8 |
|
||||
| onceUsedTemplateFunction<T>(T) | 6 | 6 | 0 |
|
||||
| templateFunctionUser(signed int,unsigned int) | 5 | 5 | 0 |
|
||||
| twiceUsedTemplateFunction<T>(T) | 6 | 6 | 0 |
|
||||
|
||||
Reference in New Issue
Block a user