C++: Add another cpp/constant-comparison FP test case

This commit is contained in:
Jeroen Ketema
2025-12-19 10:32:36 +01:00
parent 1f10cddef5
commit 112eaadfae
2 changed files with 10 additions and 0 deletions

View File

@@ -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. |

View File

@@ -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]
};