Commit Graph

3327 Commits

Author SHA1 Message Date
Jeroen Ketema
55e052af26 Merge pull request #9686 from aschackmull/dataflow/no-node-scan
Dataflow performance: Avoid node scans
2022-06-29 10:38:56 +02:00
Jeroen Ketema
a7956ad422 C++: Add change note 2022-06-28 15:32:43 +02:00
Jeroen Ketema
82c9b8b494 C++: Ensure only one Variable exists for every global variable
Depending on the extraction order, before this change there might be multiple
`GlobalVariable`s per declared global variable. See the tests in
`cpp/ql/test/library-tests/variables/global`. This change ensures that only one
of those `GlobalVariable`s is visible to the user if we can locate a unique
definition. If not, the old situation persists.

Note that an exception needs to be made for templated variables. Here, the
definition refers to the non-instantiated template, while a declaration that
is not a definition refers to an instantiation. In case the instantiation refers
to a template parameter, the mangled names of the template and the instantiation
will be identical. This happens for example in the following case:
```
template <typename T>
T x = T(42);           // Uninstantiated templated variable

template <typename T>
class C {
  T y = x<T>;          // Instantiation using a template parameter
};
```
Since the uninstantiated template and the instantiation are two different
entities, we do not unify them as described above.
2022-06-28 15:32:43 +02:00
github-actions[bot]
d506f448ef Post-release preparation for codeql-cli-2.10.0 2022-06-24 07:36:33 +00:00
Robert Marsh
4a522831c4 C++: update change note for IR global var flow 2022-06-23 14:39:13 -04:00
Robert Marsh
e45c982dd1 C++: change note for global variables in dataflow 2022-06-23 14:32:52 -04:00
Anders Schack-Mulligen
dc517a758e Autoformat 2022-06-23 14:44:40 +02:00
Anders Schack-Mulligen
4a317a25d3 Dataflow: Sync. 2022-06-23 14:34:52 +02:00
Asger F
d3df2033f0 Update cpp/ql/lib/change-notes/released/0.3.0.md 2022-06-23 14:11:11 +02:00
Asger F
bef38a64c3 Update cpp/ql/lib/CHANGELOG.md 2022-06-23 14:10:09 +02:00
github-actions[bot]
a74051c658 Release preparation for version 2.10.0 2022-06-23 11:17:46 +00:00
Jeroen Ketema
b3ac7bda35 C++: Remove redundant parentheses 2022-06-23 07:25:53 +02:00
Jeroen Ketema
9cfd1a84b6 C++: Remove out-of-date comment, as we use mangled names in ResolveClass.qll 2022-06-23 07:24:04 +02:00
Mathias Vorreiter Pedersen
1febe87356 Merge pull request #9644 from jketema/class-entry-fix
C++: Ensure we can round trip between (forward) class declarations
2022-06-22 14:12:11 +01:00
Anders Schack-Mulligen
df6d68b215 Merge pull request #9618 from aschackmull/dataflow/deprecate-barrierguard-class
Dataflow: Deprecate BarrierGuard class
2022-06-22 10:44:08 +02:00
Jeroen Ketema
4a78c9b06d C++: Add change note 2022-06-22 08:11:24 +02:00
Jeroen Ketema
880c785efe C++: Ensure we can round trip between (forward) class declarations
This was already possible when the forward class declaration and the class
definition occurred in the same scope. However, there is a common C++ usage
pattern in which this is not the case (when only a pointer to the class is
needed). In this latter scenario we could not round trip between the (forward)
`DeclarationEntry` and the `Declaration`.

Effectively this changes the code to:
```
if exists(TypeDeclarationEntry e | e.getType() = this)
then result.getType() = this
else ...
```
We use `type_decls` instead to stay close to the original code.
2022-06-22 07:58:45 +02:00
Anders Schack-Mulligen
f8f9b7d3b4 Apply suggestions from code review 2022-06-21 14:11:36 +02:00
Edoardo Pirovano
70dbd92e25 Bump minor version of all regularly released packs 2022-06-21 11:22:58 +01:00
Edoardo Pirovano
ad02b85efa Merge branch main into rc/3.6 2022-06-21 11:15:25 +01:00
Anders Schack-Mulligen
a4796e1542 Add change notes. 2022-06-21 11:17:47 +02:00
Robert Marsh
8b47b838ca C++: autoformat 2022-06-20 15:56:00 -04:00
Robert Marsh
33910a85b9 C++: restrict global variable IR generation 2022-06-20 15:51:44 -04:00
Robert Marsh
7818dafecc C++: cleanup some implicit this usage 2022-06-20 15:48:30 -04:00
Robert Marsh
54488eb49b C++: fix global vars accesses in global vars 2022-06-20 15:46:49 -04:00
Robert Marsh
048e5d8474 C++: IR data flow through global variables 2022-06-20 15:15:45 -04:00
Robert Marsh
c216176de1 C++: sync and accept new consistency test 2022-06-20 15:15:40 -04:00
Robert Marsh
f0634140b6 C++: fix inconsistencies from IR global vars 2022-06-20 14:41:10 -04:00
Robert Marsh
e0878d7d3c C++: Fix IR variable reuse for global var inits 2022-06-20 14:41:02 -04:00
Robert Marsh
767b0cfdfb Revert "Merge pull request #8933 from MathiasVP/revert-globals"
This reverts commit 2517371a37, reversing
changes made to db856798b9.
2022-06-20 14:26:10 -04:00
Anders Schack-Mulligen
bbb8d29442 C/C++: Deprecate BarrierGuard class. 2022-06-17 14:29:05 +02:00
Anders Schack-Mulligen
6518a01ded Dataflow: Sync. 2022-06-16 11:25:28 +02:00
github-actions[bot]
1ed70d51d7 Post-release preparation for codeql-cli-2.9.4 2022-06-15 13:25:20 +00:00
github-actions[bot]
104ac05f49 Release preparation for version 2.9.4 2022-06-15 08:22:38 +00:00
Robert Marsh
1a94ffb726 C++: autoformat 2022-06-14 15:59:47 -04:00
Jeroen Ketema
f71807c968 Update cpp/ql/lib/change-notes/2022-05-30-braced-initializers.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2022-06-14 15:39:24 +02:00
Jeroen Ketema
2052494eee C++: Fix typo in upgrade script 2022-06-14 15:39:14 +02:00
Jeroen Ketema
f020fdbda3 C++: Update DB scheme stats 2022-06-14 15:38:55 +02:00
Jeroen Ketema
34cbc6678f C++: Introduce relation for tracking braced initializers 2022-06-14 15:38:45 +02:00
Robert Marsh
5f77552c37 Merge branch 'main' into rdmarsh2/fix-ir-globals 2022-06-13 12:43:08 -04:00
Geoffrey White
3ae60808c1 Merge pull request #9399 from geoffw0/cleartextbufferwriteperf
C++: Improve performance of Printf::callsVariadicFormatter.
2022-06-13 14:32:55 +01:00
Geoffrey White
cd4ff54743 C++: Improve performance of Printf::callsVariadicFormatter. 2022-06-01 13:17:10 +01:00
Anders Schack-Mulligen
4f3751dfea Merge pull request #9316 from hvitved/dataflow/edges-get-a-successor-consistency
Data flow: Make `PathGraph::edges/2` and `PathNode::getASuccessor/1` consistent
2022-06-01 10:38:25 +02:00
Nick Rolfe
f417c12c5e Merge pull request #9332 from github/post-release-prep/codeql-cli-2.9.3
Post-release preparation for codeql-cli-2.9.3
2022-05-31 16:17:50 +01:00
github-actions[bot]
ed2f3409bc Post-release preparation for codeql-cli-2.9.3 2022-05-31 09:54:55 +00:00
Jeroen Ketema
ce26124c01 Update cpp/ql/lib/change-notes/2022-05-30-braced-initializers.md
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2022-05-31 10:42:31 +02:00
Jeroen Ketema
e3046fb05b C++: Fix typo in upgrade script 2022-05-31 10:37:46 +02:00
Jeroen Ketema
a833e77c30 C++: Update DB scheme stats 2022-05-30 16:26:26 +02:00
Jeroen Ketema
38be04461e C++: Introduce relation for tracking braced initializers 2022-05-30 16:26:19 +02:00
Tom Hvitved
bcdef98392 Data flow: Sync files 2022-05-25 14:39:37 +02:00