Commit Graph

41 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
5373e2222e C++: Improve IRGuads logic for 'unlikely' expressions. 2025-01-16 00:45:07 +00:00
Mathias Vorreiter Pedersen
7cca21364b C++: Accept test changes. 2025-01-16 00:39:39 +00:00
Mathias Vorreiter Pedersen
2d9036eb5f C++: Make 'getInstructionConvertedResultExpression' equivalent in C and C++. 2025-01-16 00:39:35 +00:00
Mathias Vorreiter Pedersen
ebb7f28d39 C++: Remove workaround for missing comparisons against 0 in C code. 2025-01-16 00:39:33 +00:00
Mathias Vorreiter Pedersen
0d7adac601 C++: Accept Guards test changes. 2025-01-16 00:39:31 +00:00
Mathias Vorreiter Pedersen
20dfbdc5cc Revert "Merge pull request #18057 from jketema/codeql-cli-2.19.4"
This reverts commit ed922f6519, reversing
changes made to aa4cc72f30.
2024-12-16 14:02:38 +00:00
Jeroen Ketema
fa8aba88af Revert "Merge pull request #17938 from MathiasVP/fix-fp-in-missing-check-scanf-fixing-take-2"
This reverts commit 6785b93ed8, reversing
changes made to d9b86f55c8.
2024-11-21 15:39:00 +01:00
Mathias Vorreiter Pedersen
bb85aa2fc9 C++: Accept test changes. 2024-11-14 16:29:51 +00:00
Mathias Vorreiter Pedersen
9564ae1ca4 C++: Accept more test changes. 2024-06-06 17:04:48 +01:00
Mathias Vorreiter Pedersen
5893e38567 C++: Accept test changes. 2024-05-20 22:28:17 +01:00
Mathias Vorreiter Pedersen
2939c89f7a C++: Accept test changes. 2024-04-30 12:04:42 +01:00
Mathias Vorreiter Pedersen
d18cdee0bc C++: Accept test changes. 2024-04-26 16:19:33 +01:00
Mathias Vorreiter Pedersen
97aa301ac9 C++: Accept more test changes. 2024-03-19 17:33:23 +00:00
Mathias Vorreiter Pedersen
1411ee5b26 C++: Extend tests to also test the new predicates and accept test changes. 2024-03-19 17:09:22 +00:00
Mathias Vorreiter Pedersen
c640bd67e9 C++: Fix tests for guards. 2024-03-19 14:43:16 +00:00
Mathias Vorreiter Pedersen
40dbc6fdd9 C++: Accept test changes. 2024-03-18 16:27:18 +00:00
Mathias Vorreiter Pedersen
032678a367 C++: Extend tests to also test the new predicates. 2024-03-18 16:27:10 +00:00
Jeroen Ketema
4390e4cad3 C++: Fix handling of unreached instructions in IRGuards 2023-12-06 10:23:27 +01:00
Jeroen Ketema
d6e30cd828 C++: Add test showing unreachable instructions give spurious blocks 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
Jeroen Ketema
d84961571b C++: Add IRGuards test that shows that ternary behaviour is not quite correct 2023-12-05 12:16:01 +01:00
Mathias Vorreiter Pedersen
98bf748e64 C++: Accept test changes. 2023-11-23 16:53:57 +00: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
Jonas Jensen
9153f568be C++: Accept test results with location fixes 2020-05-28 09:42:49 +02:00
Anders Schack-Mulligen
96e4a57edd C++: Autoformat. 2020-01-29 13:11:50 +01:00
Jonas Jensen
4ef5c9af62 C++: Autoformat everything
Some files that will change in #1736 have been spared.

    ./build -j4 target/jars/qlformat
    find ql/cpp/ql -name "*.ql"  -print0 | xargs -0 target/jars/qlformat --input
    find ql/cpp/ql -name "*.qll" -print0 | xargs -0 target/jars/qlformat --input
    (cd ql && git checkout 'cpp/ql/src/semmle/code/cpp/ir/implementation/**/*SSA*.qll')
    buildutils-internal/scripts/pr-checks/sync-identical-files.py --latest
2019-09-09 11:25:53 +02:00
Jonas Jensen
206a96df94 C++ IR: Rename getters for def/use on Operand
This renames `getDefinitionInstruction` to `getAnyDef`, reflecting that
it includes definitions without exact overlap. It renames
`getUseInstruction` to `getUse` for consistency.

    perl -p -i -e 's/\bgetUseInstruction\b/getUse/g; s/\bgetDefinitionInstruction\b/getAnyDef/g' \
      cpp/ql/src/semmle/code/cpp/ir/**/*.ql* \
      cpp/ql/test/**/*.ql* \
      cpp/ql/src/semmle/code/cpp/rangeanalysis/**/*.ql*
2019-07-03 10:06:48 +02:00
Robert Marsh
3c638b5966 C++: add edge-based predicates to IRGuards
These predicates currently take a pair of `IRBlock`s - as it stands, at
most one edge can exist from one `IRBlock` to a given other `IRBlock`.
We may need to revisit that assumption and create an `IREdge` IPA type
at some future date
2019-02-07 09:38:54 -08:00
Dave Bartolomeo
a7cb2d6d7c C++: Ignore Unreached blocks in IR Guards 2018-12-20 11:57:25 -08:00
Dave Bartolomeo
0140cd23d0 C++: Accept correct test output 2018-12-11 17:11:51 -08:00
Dave Bartolomeo
283c1d43c3 C++: Restore previous test expectations 2018-12-11 17:07:25 -08:00
Robert Marsh
59c0e5d39e C++: update test expectations 2018-12-11 15:07:09 -08:00
Robert Marsh
4fdc992cd9 C++: IRGuards uses Operand; fix CP in SignAnalysis 2018-11-08 14:43:51 -08:00
Dave Bartolomeo
37091953dc C++: Fix test expectations after rebase 2018-09-30 08:25:42 -07:00
Robert Marsh
93732d8b5a C++: Combine IR guard tests into one ql file
This is motivated by test performance; IR compilation happens separately
for each test and takes a bit over a minute, so combining these 8 tests
saves about 10 minutes of test running.
2018-09-27 13:53:02 -07:00
Robert Marsh
b6cc6a3b23 C++: Fix BinaryLogicalOperators always being guards 2018-09-27 13:09:15 -07:00
Robert Marsh
f323fa1df8 C++: test changes from previous commit
The IR for the conversion to bool results in a comparison where the left
hand side is not the result of any expression in the AST, so they can't
be usefully converted back to the AST
2018-09-27 13:06:57 -07:00
Robert Marsh
cc97cf9297 C++: add isReachableFromFunctionEntry 2018-09-20 10:06:19 -07:00
Robert Marsh
755e21d355 C++: improve conversion handling in IRGuards.qll 2018-09-20 10:06:18 -07:00
Robert Marsh
ad8f30d2f7 C++: accept test output and add IR guards tests 2018-09-20 10:06:17 -07:00
Robert Marsh
d7e630b3c6 C++: Add IR-based port of Guards library
For ease of reviewing, I've checked in the .expected files from the
AST-based guards library. The next commit accepts output for these tests
and adds tests that use getAST rather than the translation layer.
2018-09-20 10:06:16 -07:00