Skip to content

Commit

Permalink
C++: Accept test changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasVP committed Jul 16, 2024
1 parent 3d88f08 commit 510bfb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@
| test.cpp:276:11:276:19 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:288:10:288:18 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:312:9:312:25 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:347:9:347:17 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:352:6:352:14 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:359:10:359:18 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:362:8:362:16 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:369:10:369:18 | ... > ... | Unsigned subtraction can never be negative. |
| test.cpp:375:8:375:16 | ... > ... | Unsigned subtraction can never be negative. |
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,19 @@ void test21(unsigned long a)
{
{
int b = a & get_int64();
if (a - b > 0) { } // GOOD [FALSE POSITIVE]
if (a - b > 0) { } // GOOD
}

{
int b = a - get_uint32();
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
if(a - b > 0) { } // GOOD
}

{
int64_t c = get_int64();
if(c <= 0) {
int64_t b = (int64_t)a + c;
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
if(a - b > 0) { } // GOOD
}
int64_t b = (int64_t)a + c;
if(a - b > 0) { } // BAD
Expand All @@ -366,12 +366,12 @@ void test21(unsigned long a)
unsigned c = get_uint32();
if(c >= 1) {
int b = a / c;
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
if(a - b > 0) { } // GOOD
}
}

{
int b = a >> get_uint32();
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
if(a - b > 0) { } // GOOD
}
}

0 comments on commit 510bfb9

Please sign in to comment.