CPP: Add a test of More64BitWaste.ql.

This commit is contained in:
Geoffrey White
2019-06-27 17:10:31 +01:00
parent 5e328908a0
commit 95ab8cc706
3 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
| test.cpp:17:8:17:12 | test4 | test4 includes 0 bits of padding on ILP32, but 32 bits on LP64. |
| test.cpp:29:8:29:12 | test6 | test6 includes 0 bits of padding on ILP32, but 32 bits on LP64. |

View File

@@ -0,0 +1 @@
Likely Bugs/Memory Management/Padding/More64BitWaste.ql

View File

@@ -0,0 +1,39 @@
struct test1
{
int x;
};
struct test2
{
int x, y;
};
struct test3
{
int x, y, z;
};
struct test4 // BAD
{
int a;
long long b;
};
struct test5
{
long long a;
int b;
};
struct test6 // BAD
{
char as[4];
long long b;
};
struct test7
{
char as[8];
long long b;
};