Cornelius Riemenschneider
0b8403fc05
C++: Add one more test.
2020-11-25 16:24:55 +01:00
Cornelius Riemenschneider
7f13d4c356
C++: Improve EscapesTree analysis in the presence of temporary objects.
2020-11-25 10:41:15 +01:00
Cornelius Riemenschneider
8d024c7ff1
C++: Add tests around references to pointers with temporary objects.
2020-11-25 10:40:33 +01:00
Jonas Jensen
9153f568be
C++: Accept test results with location fixes
2020-05-28 09:42:49 +02:00
Jonas Jensen
71c21e6eca
C++: Accept test changes forgotten in 32e04b403
...
Adding a new test case leads to changes in all `.expected` files in its
directory.
The new results show that the `DefinitionsAndUses` library does not
model `std::addressof` correctly, but that library is not intended to be
used for new code.
2020-05-11 08:17:13 +02:00
Jonas Jensen
88eeca39fb
Merge commit '52d8acc1a198c5ea29c1dddceda1d6c0fb75de14' into dataflow-defbyref-to-field
...
This is a partial merge from master. In particular, it takes in #3382
and #3385 .
2020-05-07 16:46:11 +02:00
Jonas Jensen
32e04b4033
C++: Support std::addressof
...
I didn't add this support in `AddressConstantExpression.qll` since I
think it would require extra work and testing to get the constexprness
right. My long-term plan for `AddressConstantExpression.qll` is to move
its functionality to the extractor.
2020-05-07 16:30:44 +02:00
Jonas Jensen
9b9f5248af
C++: Accept test changes
...
Lambda invocations are apparently const. This was exposed by the fix in
the previous commit.
2020-05-01 15:23:00 +02:00
Jonas Jensen
8ffa124bf9
C++: Addresses may escape through call qualifiers
...
Also clarify the docs on `Call` to decrease the likelyhood of such an
omission happening again.
The updated test reflects that `f1.operator()` lets the address of `f1`
escape from the caller.
2020-04-30 14:27:40 +02:00
Jonas Jensen
763b18cd11
Merge remote-tracking branch 'upstream/master' into StackVariable
...
Conflicts:
change-notes/1.24/analysis-cpp.md
cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql
2019-11-28 17:51:20 +01:00
Jonas Jensen
e57f98ca64
C++: Use StackVariable in def-use libraries
...
Most of the implementation was already in terms of
`SemanticStackVariable`, so not much should have changed.
2019-11-19 11:30:59 +01:00
Jonas Jensen
95a333d28c
C++: Use StackVariable in SSA libraries
...
This means we'll no longer get SSA definitions for thread-local
local-scope variables.
2019-11-19 11:30:59 +01:00
Ian Lynagh
2cf714a923
C++: Follow changes in lambda locations
2019-11-15 14:42:36 +00: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
Ian Lynagh
6cb6b1c07d
C++: Tweak the defuse test
...
It looks like this is what it was originally intended to do.
2018-11-28 17:11:17 +00:00
Pavel Avgustinov
b55526aa58
QL code and tests for C#/C++/JavaScript.
2018-08-02 17:53:23 +01:00