Alexandre Boulgakov
e55bd4fb64
C++: Allow querying virtual, override, and final declaration specifiers.
2021-07-29 14:02:03 +01:00
Mathias Vorreiter Pedersen
41d233f086
C++: Make the 'definition by reference'-node in 'foo(a.b);' a source in the 'FieldConfiguration' configuration.
2021-07-29 14:49:59 +02:00
Mathias Vorreiter Pedersen
a082172422
C++: Add testcase demonstrating missing local flow out of fields that are defined by reference.
2021-07-29 14:46:32 +02:00
Mathias Vorreiter Pedersen
a006a7fb24
Revert "Merge pull request #6004 from MathiasVP/path-sensitive-stack-variable-reachability-analysis"
...
This reverts commit e3e7b00986 , reversing
changes made to 8ccdd4fb9f .
2021-07-20 18:06:49 +02:00
Robert Marsh
e0ff1d949b
Merge pull request #6315 from MathiasVP/fix-off-by-one-in-rem-expr-range-analysis
...
C++: Fix off–by-one in range analysis for `RemExpr`.
2021-07-16 15:22:03 -07:00
Mathias Vorreiter Pedersen
39d9395bc3
C++: Fix off-by-one in range analysis for 'RemExpr'.
2021-07-16 16:35:19 +02:00
Mathias Vorreiter Pedersen
81aa115838
C++: Fix range analysis bug for 'RemExpr'.
2021-07-16 16:28:08 +02:00
Mathias Vorreiter Pedersen
dc2eea59a3
C++: Add buggy testcase with 'RemExpr'.
2021-07-16 16:27:09 +02:00
Mathias Vorreiter Pedersen
be06230b43
Merge branch 'main' into path-sensitive-stack-variable-reachability-analysis
2021-07-12 14:46:44 +02:00
Anders Schack-Mulligen
95ad8b55fe
Merge pull request #6107 from aschackmull/dataflow/implicit-reads
...
Dataflow: Add support for implicit reads
2021-06-24 15:38:35 +02:00
Alex Denisov
653afc8448
C++: Adjust test expectations after frontend upgrade
2021-06-23 14:39:16 +02:00
Anders Schack-Mulligen
810de73246
C/C++: Update qltest expected output.
2021-06-21 14:47:31 +02:00
Mathias Vorreiter Pedersen
14a04ee453
C++: Accept more test changes. These all arise because we now transitively pull in 'semmle.code.cpp.Print' when including 'cpp'.
2021-06-14 22:02:46 +02:00
John L. Singleton
0d3f53b013
Changes to structure per feedback of @jbj
2021-06-10 11:16:58 -04:00
John L. Singleton
01cac13a48
format ql test files.
2021-06-09 17:16:26 -04:00
John L. Singleton
b91a0dbe16
removed accidental modification.
2021-06-09 17:12:59 -04:00
John L. Singleton
1fe3c9d093
removed accidental modification.
2021-06-09 17:11:39 -04:00
John L. Singleton
28e2cdb54e
adding standard C/C++ fixed width, minimum width, and maximum width types
2021-06-09 16:12:58 -04:00
Mathias Vorreiter Pedersen
025043afca
Merge pull request #6010 from geoffw0/charloc
...
C++: Test and fix maxCols / charLoc
2021-06-08 11:15:04 +02:00
Alex Denisov
a12954a403
C++: Remove outdated comment
2021-06-07 17:15:21 +02:00
Geoffrey White
6f05fd4839
C++: Autoformat.
2021-06-07 11:01:00 +01:00
Alex Denisov
17be6e1271
C++: Fix string literal expectation
2021-06-07 09:47:26 +02:00
Mathias Vorreiter Pedersen
8e8c2e677a
C++: Accept test changes.
2021-06-04 18:49:20 +02:00
Mathias Vorreiter Pedersen
f2d7988d72
C++: Add tests involving various non-const and const smart pointers.
2021-06-04 18:46:05 +02:00
Geoffrey White
a93246d28b
C++: Fix maxCols.
2021-06-04 13:05:13 +01:00
Geoffrey White
ea96826810
C++: Add a test of charLoc and subsumes.
2021-06-04 13:05:07 +01:00
Jonas Jensen
7282ad90d0
Merge pull request #5854 from dbartol/dbartol/smart-pointers/side-effects
...
C++: Generate side effect instructions for smart pointer indirections
2021-06-01 16:57:05 +02:00
Dave Bartolomeo
da14647e5a
Merge pull request #5522 from github/rdmarsh2/cpp/ssa-reuse
...
C++: reuse unaliased SSA results when computing aliased SSA
2021-06-01 10:17:54 -04:00
Alex Denisov
694eba66f3
C++: Adjust tests for new specifiers
2021-05-20 10:49:20 +02:00
Alex Denisov
dcdd54593e
C++: Adjust user-defined literals test' expectations
2021-05-10 13:03:40 +02:00
Dave Bartolomeo
187e136ecc
C++: Generate IR side effects for smart pointer indirections
...
When inserting side effect instructions for argument indirections, we now insert side effects for smart pointers as we would for raw pointers. The address operand of the side effect instruction is the smart pointer object, which is a bit odd. However, I'd like to think through the design of a more principled solution before doing additional work.
A few new tests are added to the existing IR tests. In addition, the IR tests now `#include` some of the shared STL headers. I've disabled IR dumps for functions from those headers, since they only get in the way of the test cases we intended.
2021-05-07 16:50:03 -04:00
Robert Marsh
1f69b31239
C++: test changes in annotate_sinks_only
2021-05-06 08:14:43 -07:00
Robert Marsh
195b811422
C++: handle phi operands from unreachable blocks
2021-05-06 08:14:42 -07:00
Robert Marsh
6600436dd9
C++: handle degenerate phi nodes
2021-05-06 08:14:41 -07:00
Robert Marsh
7930c4ab19
C++: tests for phi nodes after unreachable blocks
2021-05-06 08:14:41 -07:00
Robert Marsh
86b1d032ae
C++: accept test regressions
2021-05-06 08:14:38 -07:00
Robert Marsh
f9e0ba17e0
C++: remove points-to expectations for reused SSA
2021-05-06 08:14:37 -07:00
Robert Marsh
1c72ea97a7
C++: accept phi node reorderings in IR tests
2021-05-06 08:14:37 -07:00
Robert Marsh
a9d7990596
C++: make unaliased_ssa IR stage sound
2021-05-06 08:14:33 -07:00
Robert Marsh
d95ef89cee
C++: add test for IR alias analysis soundness
2021-05-06 08:14:32 -07:00
Dave Bartolomeo
383210096c
C++: Isolate models from AST dataflow's reference/object conflation
...
`DataFlowFunction` models treat references a pointers - an explicit level of indirection. The AST dataflow library generally treats references as if they were the referred-to object. This commit removes a workaround in the dataflow model for unary `operator*` on smart pointers, and makes the AST dataflow library adjust the results of querying the model so that a returned reference only gets flow that was modeled as going to the dereference of the return value.
This fixes some missing flow in IR dataflow, and recovers some (presumably) missing reverse taint flow in AST taint tracking as well.
2021-04-21 18:09:44 -04:00
Dave Bartolomeo
1d0cb0407d
Merge from main
2021-04-20 23:37:04 -04:00
Dave Bartolomeo
a447b049fc
C++: Impoved alias analysis of smart pointers
2021-04-20 19:42:06 -04:00
Mathias Vorreiter Pedersen
61d4d17225
C++: Simplify smart pointer model and accept test changes.
2021-04-20 09:57:58 +02:00
Robert Marsh
fe57876fd8
Merge pull request #5643 from dbartol/smart-pointers/side-effect-refactor
...
C++: Refactor some side effect generation code
2021-04-14 09:59:41 -07:00
Jonas Jensen
b4f01c9afa
Merge pull request #5578 from MathiasVP/ast-flow-smart-pointers
...
C++: AST dataflow through smart pointers
2021-04-14 16:39:05 +02:00
Mathias Vorreiter Pedersen
bc7cc2f7ce
C++: Remove rule that wasn't needed.
2021-04-14 14:50:27 +02:00
Mathias Vorreiter Pedersen
da36508714
Revert "C++: As response to the review comments this commit adds a reference-to-pointer state to AddressFlow. A call to an unwrapper function now adds a pointer -> reference-to-pointer transition, and a ReferenceDereference adds a reference-to-pointer -> pointer transition."
...
This reverts commit 5aeaab7c6d .
2021-04-14 14:41:22 +02:00
Dave Bartolomeo
697b2dcde8
C++: Add missing store step for single-field struct use
...
We have special code to handle field flow for single-field structs, but that special case was too specific. Some `Store`s to single-field structs have no `Chi` instruction, which is the case that we handled already. However, it is possible for the `Store` to have a `Chi` instruction (e.g. for `{AllAliased}`), but still have a use of the result of the `Store` directly. We now add a `PostUpdateNode` for the result of the `Store` itself in those cases, just like we already did if the `Store` had no `Chi`.
2021-04-12 18:11:41 -04:00
Mathias Vorreiter Pedersen
037e6369ce
C++: Ensure all values are bound in both disjunctions.
2021-04-12 18:27:21 +02:00