Commit Graph

66 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
32fe084630 Update cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-04-30 14:42:30 +01:00
Mathias Vorreiter Pedersen
bb6cc92728 C++: Support guards without implicit boolean conversions. 2024-04-30 12:04:35 +01:00
Mathias Vorreiter Pedersen
d736426529 C++: Support guards without implicit boolean conversions. 2024-04-30 11:45:58 +01:00
Mathias Vorreiter Pedersen
b78537dd74 C++: Allow comparisons with pointer types in IRGuards. 2024-04-26 16:19:24 +01:00
Mathias Vorreiter Pedersen
3a7b80da47 C++: Respond to review comments. 2024-03-20 10:12:29 +00:00
Mathias Vorreiter Pedersen
a78080cc0e C++: Implement less-than logic for guard conditions when comparing to constants. 2024-03-19 17:06:26 +00:00
Mathias Vorreiter Pedersen
8b85735cdc C++: Generalize predicates from booleans to abstract values. 2024-03-19 17:03:59 +00:00
Mathias Vorreiter Pedersen
6ce3f35ef5 C++: Fix API for guards. 2024-03-19 14:43:10 +00:00
Mathias Vorreiter Pedersen
350b239ed6 C++: Fix cartesian product in 'simple_comparison_eq'. 2024-03-19 10:29:43 +00:00
Mathias Vorreiter Pedersen
dbd47b387a C++: Add AST wrappers for the new predicates. 2024-03-18 16:26:36 +00:00
Mathias Vorreiter Pedersen
44045d3eed C++: Add guards logic for constant comparisons. 2024-03-18 16:07:57 +00:00
Mathias Vorreiter Pedersen
a21eea4ee0 C++: Generalize more predicates from booleans to abstract values. 2024-03-18 16:07:57 +00:00
Mathias Vorreiter Pedersen
f4f417c3f9 C++: Fix QLoc. 2024-03-15 17:19:36 +00:00
Mathias Vorreiter Pedersen
34decd3cf1 C++: Add more general public predicates to work with abstract values. 2024-03-15 17:03:45 +00:00
Mathias Vorreiter Pedersen
f4eb5f5a2d C++: Convert 'getBranchSuccessor' to use abstract values. 2024-03-15 17:03:45 +00:00
Mathias Vorreiter Pedersen
b7292fbc67 C++: Introduce 'AbstractValue' similar to what C# has. 2024-03-15 17:03:45 +00:00
Mathias Vorreiter Pedersen
2af68d37d0 C++: Include 'SwitchInstruction's as 'IRGuardCondition's. 2024-03-15 17:03:45 +00:00
Geoffrey White
2e66392353 C++: Update deprecated note to respect identical files. 2024-02-26 16:38:27 +00:00
Jeroen Ketema
2becb3043e Merge pull request #15638 from jketema/destructors5
C++: Support C++20 range-based for initializers
2024-02-19 16:22:23 +01:00
Jeroen Ketema
dd39fa0bde C++: Support C++20 range-based for initializers 2024-02-16 15:20:14 +01:00
Mathias Vorreiter Pedersen
06ff46091d C++: Fix joins in 'controlsBlock'. 2024-02-16 14:49:20 +01:00
Jeroen Ketema
f7da6f56f3 C++: Ensure that only one Function exists for every function 2023-12-21 16:33:22 +01:00
Robert Marsh
172445f5e7 C++: replace Guards with IRGuards 2023-12-06 12:47:20 +01:00
Jeroen Ketema
4390e4cad3 C++: Fix handling of unreached instructions in IRGuards 2023-12-06 10:23:27 +01:00
Jeroen Ketema
4d702e2eee C++: Fix IRGuards ternary behaviour 2023-12-05 12:17:46 +01:00
Mathias Vorreiter Pedersen
7364634a6b C++: No need to special-case negations in IRGuards. 2023-11-23 16:53:57 +00:00
Tony Torralba
0cea3f8531 Remove library annotations 2023-10-13 12:46:56 +02:00
Alexander Eyers-Taylor
1f4a5301cd Merge pull request #14242 from alexet/simplify-ir-guards
CPP: Simplify some code in IRGuards.
2023-09-19 10:35:09 +01:00
Alex Eyers-Taylor
c7ccfac938 CPP: Simplify some code in IRGuards. 2023-09-18 10:51:48 +01:00
Mathias Vorreiter Pedersen
b18de9e641 C++: Add a named base case predicate for 'dereferencedByOperation' that can be used in queries. 2023-09-14 17:12:58 +01:00
Alex Eyers-Taylor
417b9c9a32 CPP: Use DeleteOrDeleteArrayExpr in another place. 2023-08-25 15:45:50 +01:00
Alex Eyers-Taylor
a3711e1df0 CPP: Replace getAllocatorCall with getDeallocator call. 2023-08-25 15:45:50 +01:00
Jeroen Ketema
8bc8ef4dda C++: Support pointer addition and subtraction in the IRGuards library
It seems this was something supported by the AST Guards library
2023-07-06 16:54:44 +02:00
erik-krogh
a4ef8619c6 delete old deprecations 2023-06-08 10:10:21 +02:00
Kasper Svendsen
f8b3968b38 C++: Make implicit this receivers explicit 2023-05-10 15:15:21 +02:00
Kasper Svendsen
c46898cb75 C++: Make implicit this receivers explicit 2023-05-09 15:35:54 +02:00
erik-krogh
f96d6accbb delete old deprecations 2023-03-03 09:23:02 +01:00
Tony Torralba
3fcc99e5cb C++: Remove omittable exists variables 2023-01-10 13:36:01 +01:00
Josh Soref
bbc9931b05 spelling: primitive
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-14 15:08:44 -04:00
Josh Soref
2027278f66 spelling: corresponds
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-14 15:08:43 -04:00
Erik Krogh Kristensen
887f6557ed fix common misspellings throughout github/codeql 2022-08-10 23:21:41 +02:00
Jeroen Ketema
f7c4fa691d Apply suggestions from code review
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2022-07-12 16:59:15 +02:00
Jeroen Ketema
d63b0946d9 C++: Use ConditionDeclExpr in AnalysedExpr::isDef 2022-07-12 15:22:13 +02:00
Jeroen Ketema
2ceb25dc9a C++: Order left and right operands in the logical left to right order 2022-07-12 15:21:37 +02:00
REDMOND\brodes
4379aa4398 Adding Initializer in condition as an occurance of isDef 2022-07-07 10:32:36 -04:00
REDMOND\brodes
74ff579dbc Fixing logic bug with LogicalAndExpr 2022-07-06 15:19:36 -04:00
Nick Rolfe
1115227f9d Merge remote-tracking branch 'origin/main' into nickrolfe/misspelling 2022-05-12 16:10:27 +01:00
Nick Rolfe
76cf8d1659 C++: fix typos in comments 2022-05-12 14:28:26 +01:00
Jeroen Ketema
71c019e126 C++: Handle C++17 switch initializers 2022-05-12 12:56:50 +02:00
Jeroen Ketema
ebbd9c5b90 C++: Handle C++17 if initializers 2022-05-12 12:56:50 +02:00