Geoffrey White
6552c849f0
C++: Fix BMN issue in cpp/integer-multiplication-cast-to-long.
2026-03-11 17:49:36 +00:00
Geoffrey White
da7da80b2b
C++: Add pseudo-buildless test cases (some missing declarations).
2026-03-11 17:47:25 +00:00
Simon Friis Vindum
f5ddb1d51d
C++: Remove safeFloor in simple range analysis
2026-01-07 12:49:09 +01:00
Jeroen Ketema
5117b5906b
C++: Exclude comparisons from enum constants in `cpp/constant-comparison
2026-01-06 13:53:44 +01:00
Jeroen Ketema
112eaadfae
C++: Add another cpp/constant-comparison FP test case
2026-01-06 13:53:43 +01:00
Jeroen Ketema
90d6c9fc56
C++: Exclude more comparisons from cpp/constant-comparison
2026-01-06 13:53:40 +01:00
Jeroen Ketema
509cbf7049
C++: Add cpp/constant-comparison FP test cases after frontend update
2026-01-06 13:53:38 +01:00
erik-krogh
33165f4f55
CPP: update expected output
2022-09-23 14:45:59 +02:00
erik-krogh
a50234adb0
apply suggestion from review
2022-08-23 15:41:37 +02:00
erik-krogh
1a7d3ee831
update expected output after changing queries
2022-08-23 12:35:32 +02:00
erik-krogh
7e0bd5bde4
update expected output of tests
2022-08-22 21:41:47 +02:00
Mathias Vorreiter Pedersen
65c301c39f
Update cpp/ql/test/query-tests/Likely Bugs/Arithmetic/BadAdditionOverflowCheck/templates.cpp
...
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com >
2021-12-15 09:22:41 +00:00
Mathias Vorreiter Pedersen
b2082cc3da
C++: Fix false positive in 'cpp/cpp/comparison-of-identical-expressions'.
2021-12-14 16:39:25 +00:00
Mathias Vorreiter Pedersen
9d14a85f3f
C++: Add false positive.
2021-12-14 16:38:19 +00:00
Anders Fugmann
c110508b4e
C++: Add tests to expose potential improvements available to SimpleRangeAnalysis
2021-09-02 21:20:33 +02:00
Cornelius Riemenschneider
7f13d4c356
C++: Improve EscapesTree analysis in the presence of temporary objects.
2020-11-25 10:41:15 +01:00
Cornelius Riemenschneider
e68352bcde
C++: Add testcase for false positive.
2020-11-25 10:40:33 +01:00
Geoffrey White
460fbea253
C++: Add some more cases.
2020-10-19 15:54:42 +01:00
Geoffrey White
6280b7d5d4
C++: Add the example code for IntMultToLong to the test.
2020-10-19 15:45:31 +01:00
Jonas Jensen
ad11f76ec6
C++: Always normalize bounds after a computation
...
This stops some cases of `-0.0` from propagating through the range
analysis, fixing a false positive on arvidn/libtorrent.
There seems to be no need for a corresponding change in the caller of
`getDefLowerBoundsImpl` since that predicate only contains computations
that cannot introduce negative zero.
2020-09-11 11:59:00 +02:00
Jonas Jensen
0c8e06ba68
C++: Tests for -0.0 in range analysis
2020-09-11 11:52:39 +02:00
Jonas Jensen
27345c64f3
C++: Also accept PointlessComparison test changes
2020-08-18 09:32:05 +02:00
Jonas Jensen
93d8d8eb1d
C++: Demonstrate range analysis MulExpr bugs
...
Unless these issues can be reproduced in far less contrived code, I
don't think they will cause problems in practice.
2020-08-12 12:10:23 +02:00
Jonas Jensen
1ee96a4b4f
C++: SimpleRangeAnalysis: unsigned multiplication
2020-08-12 10:03:04 +02:00
Mathias Vorreiter Pedersen
834ad92453
C++: Add test cases for unsigned multiplication and fix missing return value in existing tests
2020-07-14 16:57:47 +02:00
Geoffrey White
a4fa4c859a
C++: Fix rounding for >>.
2020-05-11 18:55:01 +01:00
Geoffrey White
b1c32deabc
C++: Add some tests with 64-bit values.
2020-05-11 18:54:50 +01:00
Geoffrey White
c8524522c8
C++: Add test cases.
2020-05-06 18:51:50 +01:00
Geoffrey White
2cee756587
C++: Support the mirror case with <=.
2020-03-16 13:22:00 +00:00
Geoffrey White
dcf2f7f19c
C++: Add some test cases for the mirror case, with <=.
2020-03-16 13:22:00 +00:00
Geoffrey White
3d8633f701
C++: Additional test cases for the recursive bit of UnsignedGEZero.
2020-03-16 13:22:00 +00:00
Mathias Vorreiter Pedersen
e1942bbee1
C++: Fix false positives
2020-03-13 17:09:57 +01:00
Mathias Vorreiter Pedersen
cc25298f67
C++: Demonstrate false positives when a const variable is initialized in a parameter list
2020-03-13 17:00:54 +01:00
Mathias Vorreiter Pedersen
100ace532f
C++: Fixed handling of false negative. Query now supports global variables
2020-01-07 22:57:21 +01:00
Mathias Vorreiter Pedersen
db08076fed
C++: Fixed false negative
2020-01-07 22:20:04 +01:00
Mathias Vorreiter Pedersen
229da0a9c0
C++: Add testcase demonstrating false negative
2020-01-07 22:12:34 +01:00
Mathias Vorreiter Pedersen
9ed1510a8c
C++: Improved query precision using SimpleRangeAnalysis
2020-01-06 14:16:52 +01:00
Mathias Vorreiter Pedersen
e926966e73
C++: Added more tests
2020-01-03 14:08:12 +01:00
Mathias Vorreiter Pedersen
cea78879b2
C++: Rename variables in tests to reflect their types
2020-01-03 14:07:19 +01:00
Mathias Vorreiter Pedersen
7dbb191531
C++: Improve query precision
2020-01-02 15:53:22 +01:00
Mathias Vorreiter Pedersen
cfb839a8f9
C++: Add test demonstrating the false positive
2020-01-02 15:48:01 +01:00
Geoffrey White
e77fefaf9e
Merge pull request #2295 from jbj/self-comparison-templates
...
C++: Suppress PointlessSelfComparison.ql on templates
2019-11-11 14:12:55 +00:00
Jonas Jensen
97cc0ebc8c
C++: Suppress PointlessSelfComparison on templates
...
It's a bit crude to suppress all results in instantiations, but we're
already using this kind of suppression in `PointlessComparison.ql`
(without the `Self`) because there is no convenient alternative. It
means we lose some good results but also suppress a new false positive
in Boost that surfaced after we added support for non-type template
parameters.
2019-11-11 14:00:00 +01:00
Jonas Jensen
281d512178
C++: Add tests for self-comparison template FP
2019-11-11 13:52:22 +01:00
Jonas Jensen
f3e691b5ec
Merge pull request #2075 from zlaski-semmle/zlaski/cpp434
...
[CPP-434] Detect signed overflow checks
2019-11-09 09:57:23 +01:00
Ziemowit Laski
2bad9394b7
[CPP-434] Squelch alerts for expressions inside macros; try to make Qhelp Jenkins-friendly.
2019-11-01 15:24:22 -07:00
Ziemowit Laski
6ee3d7d788
[CPP-434] Address more comments re .cpp test cases.
2019-10-25 15:50:00 -07:00
Ziemowit Laski
7204e13746
[CPP-434] Address comments re .cpp test cases.
2019-10-25 14:37:28 -07:00
Geoffrey White
e48936244d
CPP: Reword the query message.
2019-10-24 16:22:51 +01:00
Ziemowit Laski
ad5aa182df
[CPP-434] When analyzing overflow, discard any explicit casts.
...
Use the simple range analysis library to detect which
additions may in fact overflow.
2019-10-22 15:21:30 -07:00