mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
24 lines
362 B
C++
24 lines
362 B
C++
// main.cpp
|
|
|
|
int x; // BAD: too short
|
|
int ys[1000000]; // BAD: too short
|
|
int descriptive_name; // GOOD: sufficient
|
|
|
|
static int z; // GOOD: not a global
|
|
|
|
int v1;
|
|
int v2;
|
|
template <typename T>
|
|
T v3;
|
|
template <typename T>
|
|
T v4;
|
|
template <typename T>
|
|
T v5;
|
|
|
|
void use_some_fs() {
|
|
v2 = 100;
|
|
v4<int> = 200;
|
|
v5<int> = 300;
|
|
v5<const char *> = "string";
|
|
}
|