mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #9643 from jketema/namespace-variable-test
C++: Add variable in namespace test
This commit is contained in:
4
cpp/ql/test/library-tests/variables/global/d.cpp
Normal file
4
cpp/ql/test/library-tests/variables/global/d.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
namespace aNameSpace {
|
||||
int xs[] = { 1, 2 };
|
||||
}
|
||||
4
cpp/ql/test/library-tests/variables/global/d.h
Normal file
4
cpp/ql/test/library-tests/variables/global/d.h
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
namespace aNameSpace {
|
||||
extern int xs[2];
|
||||
}
|
||||
2
cpp/ql/test/library-tests/variables/global/e.cpp
Normal file
2
cpp/ql/test/library-tests/variables/global/e.cpp
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
#include "d.h"
|
||||
@@ -10,6 +10,8 @@
|
||||
| c.h:6:12:6:13 | declaration of ls | array of 4 {int} | 1 |
|
||||
| c.h:8:12:8:14 | declaration of iss | array of {array of 2 {int}} | 1 |
|
||||
| c.h:10:12:10:12 | declaration of i | int | 1 |
|
||||
| d.cpp:3:7:3:8 | definition of xs | array of {int} | 1 |
|
||||
| d.h:3:14:3:15 | declaration of xs | array of 2 {int} | 1 |
|
||||
| file://:0:0:0:0 | definition of fp_offset | unsigned int | 1 |
|
||||
| file://:0:0:0:0 | definition of gp_offset | unsigned int | 1 |
|
||||
| file://:0:0:0:0 | definition of overflow_arg_area | pointer to {void} | 1 |
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
| c.h:4:12:4:13 | ks | array of {int} | 1 |
|
||||
| c.h:8:12:8:14 | iss | array of {array of 2 {int}} | 1 |
|
||||
| c.h:10:12:10:12 | i | int | 1 |
|
||||
| d.cpp:3:7:3:8 | xs | array of {int} | 1 |
|
||||
| d.h:3:14:3:15 | xs | array of 2 {int} | 1 |
|
||||
| file://:0:0:0:0 | (unnamed parameter 0) | reference to {const {struct __va_list_tag}} | 1 |
|
||||
| file://:0:0:0:0 | (unnamed parameter 0) | rvalue reference to {struct __va_list_tag} | 1 |
|
||||
| file://:0:0:0:0 | fp_offset | unsigned int | 1 |
|
||||
| file://:0:0:0:0 | gp_offset | unsigned int | 1 |
|
||||
| file://:0:0:0:0 | overflow_arg_area | pointer to {void} | 1 |
|
||||
|
||||
Reference in New Issue
Block a user