mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
C++: Add another cpp/constant-comparison FP test case
This commit is contained in:
@@ -50,4 +50,5 @@
|
||||
| PointlessComparison.cpp:43:6:43:29 | ... >= ... | Comparison is always true because ... >> ... >= 140737488355327.5. |
|
||||
| PointlessComparison.cpp:44:6:44:28 | ... >= ... | Comparison is always true because ... >> ... >= 140737488355327.5. |
|
||||
| RegressionTests.cpp:57:7:57:22 | ... <= ... | Comparison is always true because * ... <= 4294967295. |
|
||||
| RegressionTests.cpp:165:9:165:33 | ... > ... | Comparison is always true because ... * ... >= 64. |
|
||||
| Templates.cpp:9:10:9:24 | ... <= ... | Comparison is always true because local <= 32767. |
|
||||
|
||||
@@ -155,3 +155,12 @@ struct someType {
|
||||
};
|
||||
|
||||
someType<42>::b someType_x;
|
||||
|
||||
struct A_Struct {
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
enum E {
|
||||
E_e = sizeof(A_Struct) * 8 > 50 // GOOD [FALSE POSITIVE]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user