mirror of
https://github.com/github/codeql.git
synced 2026-02-23 02:13:41 +01:00
C++: Add a test showing that we infer a lower and upper bound for parameters of enum types.
This commit is contained in:
@@ -1086,6 +1086,7 @@
|
||||
| test.c:970:12:970:12 | y | 256 |
|
||||
| test.c:971:9:971:9 | x | 2147483647 |
|
||||
| test.c:972:9:972:9 | y | 256 |
|
||||
| test.c:985:7:985:7 | e | -2147483648 |
|
||||
| test.cpp:10:7:10:7 | b | -2147483648 |
|
||||
| test.cpp:11:5:11:5 | x | -2147483648 |
|
||||
| test.cpp:13:10:13:10 | x | -2147483648 |
|
||||
|
||||
@@ -4937,6 +4937,13 @@ estimateNrOfBounds
|
||||
| test.c:970:18:970:20 | 512 | 1.0 |
|
||||
| test.c:971:9:971:9 | x | 1.0 |
|
||||
| test.c:972:9:972:9 | y | 1.0 |
|
||||
| test.c:977:9:977:11 | 1 | 1.0 |
|
||||
| test.c:978:9:978:11 | 2 | 1.0 |
|
||||
| test.c:979:9:979:11 | 4 | 1.0 |
|
||||
| test.c:980:9:980:11 | 8 | 1.0 |
|
||||
| test.c:981:9:981:12 | 16 | 1.0 |
|
||||
| test.c:985:7:985:7 | (int)... | 1.0 |
|
||||
| test.c:985:7:985:7 | e | 1.0 |
|
||||
| test.cpp:9:11:9:12 | - ... | 1.0 |
|
||||
| test.cpp:9:12:9:12 | 1 | 1.0 |
|
||||
| test.cpp:10:7:10:7 | (bool)... | 1.0 |
|
||||
|
||||
@@ -972,3 +972,15 @@ void test_overflow() {
|
||||
out(y);
|
||||
}
|
||||
}
|
||||
|
||||
enum MY_ENUM_2 {
|
||||
A = 0x1,
|
||||
B = 0x2,
|
||||
C = 0x4,
|
||||
D = 0x8,
|
||||
E = 0x10
|
||||
};
|
||||
|
||||
void test_enum(enum MY_ENUM_2 e) {
|
||||
out(e);
|
||||
}
|
||||
@@ -1086,6 +1086,7 @@
|
||||
| test.c:970:12:970:12 | y | 256 |
|
||||
| test.c:971:9:971:9 | x | 2147483647 |
|
||||
| test.c:972:9:972:9 | y | 256 |
|
||||
| test.c:985:7:985:7 | e | 2147483647 |
|
||||
| test.cpp:10:7:10:7 | b | 2147483647 |
|
||||
| test.cpp:11:5:11:5 | x | 2147483647 |
|
||||
| test.cpp:13:10:13:10 | x | 2147483647 |
|
||||
|
||||
Reference in New Issue
Block a user