Commit Graph

2466 Commits

Author SHA1 Message Date
Jeroen Ketema
38b4c02508 C++: Support link targets for global and namespace variables 2022-08-18 17:01:02 +02:00
Erik Krogh Kristensen
e93ff8672c Merge pull request #10075 from erik-krogh/depOld
delete old deprecations
2022-08-17 21:21:57 +02:00
Tom Hvitved
355c1f5959 Merge pull request #10035 from hvitved/ssa/phi-reads
SSA: Improve use-use calculation using "phi read nodes"
2022-08-17 13:43:00 +02:00
erik-krogh
5586c9a17e delete old deprecations 2022-08-16 22:27:15 +02:00
Jeroen Ketema
31aa6692cb Sync files 2022-08-16 16:38:37 +02:00
Jeroen Ketema
243dda79d2 C++: Expose PresentIRFunction and override in cpp/count-ir-inconsistencies
The `toString` implementtion that `PresentIRFunction` uses may result in very
long strings that may crash the evaluator. Overriding allows is to limit the
string size and still suffices when just counting the number of inconsistencies.
2022-08-16 16:30:38 +02:00
Tom Hvitved
7395587244 Sync files 2022-08-16 14:07:39 +02:00
Jeroen Ketema
6c4685e538 C++: Fix block assignment evaluation order comment in IR translation 2022-08-15 11:58:57 +02:00
Mathias Vorreiter Pedersen
dfde5712a3 Merge pull request #10031 from jketema/block-assign
C++: Handle block assignments
2022-08-15 10:29:23 +01:00
Anders Schack-Mulligen
a3fb54c9de Merge pull request #10007 from aschackmull/dataflow/source-node-identity
Dataflow: Fix identification of source PathNodes in the presence of source-to-source flow
2022-08-15 10:39:17 +02:00
Jeroen Ketema
4d76fd198e C++: Handle block assignments in the IR 2022-08-12 18:43:23 +02:00
Jeroen Ketema
5c905b76b4 C++: Expose block assignment operations in the QL library 2022-08-12 18:43:23 +02:00
Jeroen Ketema
e1b1657cdd C++: Remove unused abstract predicate 2022-08-12 18:43:23 +02:00
Erik Krogh Kristensen
73df8e4c7d Merge pull request #9832 from erik-krogh/misspellings
Fix lots of misspellings
2022-08-11 12:43:26 +02:00
Jeroen Ketema
faaf1ec30d C++: Improve QLDoc based on earlier review 2022-08-11 11:31:21 +02:00
Erik Krogh Kristensen
887f6557ed fix common misspellings throughout github/codeql 2022-08-10 23:21:41 +02:00
Jeroen Ketema
b20961a065 C++: Expose constant expressions as attribute arguments 2022-08-10 21:11:58 +02:00
Jeroen Ketema
9ae9b89529 C++: Improve accuracy of AttributeArgument.getValueText QLDoc 2022-08-10 21:11:58 +02:00
Jeroen Ketema
0e12c9d8b1 C++: Simplify this suppression for specifiers 2022-08-10 21:11:58 +02:00
Anders Schack-Mulligen
abad133ab5 Dataflow: Fix identification of source PathNodes in the presence of source-to-source flow. 2022-08-10 15:02:56 +02:00
Erik Krogh Kristensen
559ec7ba56 Merge branch 'main' into repeatedWord 2022-08-09 21:22:47 +02:00
Anders Schack-Mulligen
3d47875b60 Dataflow: Generate shorter RA/DIL names. 2022-08-05 11:00:56 +02:00
Anders Schack-Mulligen
d3dcc3ce3a Dataflow: Sync. 2022-08-05 11:00:56 +02:00
Jeroen Ketema
ba2cee07a9 Merge pull request #8596 from rdmarsh2/rdmarsh2/dataflow-global-vars
C++: IR data flow through global variables
2022-08-05 10:07:00 +02:00
Mathias Vorreiter Pedersen
5181cc1295 C++: Add a 'allowInterproceduralFlow' predicate to the 'MustFlow' library to and use it instead of checking the enclosing callables after computing the dataflow graph. 2022-08-02 13:43:01 +01:00
Robert Marsh
f0697ff28b C++: fix QL4QL warnings 2022-08-01 15:23:59 -04:00
Robert Marsh
6dbaae6bfc Merge branch 'main' into rdmarsh2/dataflow-global-vars 2022-08-01 14:56:24 -04:00
Robert Marsh
4f8373f577 Merge branch 'main' into rdmarsh2/dataflow-global-vars 2022-08-01 14:55:45 -04:00
Jeroen Ketema
a27b1ee33a C++: Improve ErrorExpr documentation to match current practise 2022-07-29 09:08:56 +02:00
Jeroen Ketema
5a59354d73 C++: Minor clean up of the builtin operations qldoc 2022-07-29 09:08:56 +02:00
Jeroen Ketema
bce253920c C++: Fix __builtin_shuffle qldoc 2022-07-29 09:08:56 +02:00
Jeroen Ketema
20b66eaf34 C++: Support __builtin_shuffle builtin
While here write gcc instead of GNU, which is more accurate.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
81e687ea98 C++: Support __builtin_bit_cast builtin 2022-07-29 09:08:56 +02:00
Jeroen Ketema
a85d3f9b7f C++: Support __has_unique_object_representations builtin 2022-07-29 09:08:56 +02:00
Jeroen Ketema
0c03935437 C++: Support __is_aggregate builtin
Fix some whitespace issues while here.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
c4283dd23f C++: Support __is_assignable builtin
While here fix the documentation of `__is_trivially_assignable` and
`__is_nothrow_assignable`.
2022-07-29 09:08:56 +02:00
Jeroen Ketema
a9d95a9418 C++: Remove pragma[noinline] from ResolveGlobalVariable.ql 2022-07-22 17:59:27 +02:00
Jeroen Ketema
23c19311fb Merge pull request #9700 from jketema/resolve-global-variable
C++: Ensure only one `Variable` exists for every global variable
2022-07-22 17:57:21 +02:00
Erik Krogh Kristensen
625e37a0da fix typo
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
2022-07-14 21:53:21 +02:00
Erik Krogh Kristensen
85a652f3d1 remove a bunch of repeated words 2022-07-14 12:42:48 +02:00
Jeroen Ketema
c18428f1a9 Merge pull request #9785 from bdrodes/main
C++: Nullness.qll bug fixes
2022-07-12 21:43:44 +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
Jeroen Ketema
c75599c3da C++: Clarify the "most-specific" part of FunctionCall:getTarget 2022-07-12 10:28:19 +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
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
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