Commit Graph

1793 Commits

Author SHA1 Message Date
Erik Krogh Kristensen
d36c66cfca remove redundant inline casts in arguments where the type is inferred by the call target 2021-10-29 14:37:56 +02:00
Mathias Vorreiter Pedersen
675e284c0e C++: A 'LoadInstruction' in a store chain always sets 'certain = false'. 2021-10-28 14:52:57 +01:00
Mathias Vorreiter Pedersen
2cd23e5ee0 Accept test changes. 2021-10-28 12:36:36 +01:00
Mathias Vorreiter Pedersen
8135dcefdd Merge branch 'main' into use-shared-ssa-in-ir-dataflow 2021-10-28 12:36:25 +01:00
Mathias Vorreiter Pedersen
21a1ee7758 C++: Add annoying case in SSA.qll related to 'NewExpr' and accept test changes. 2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
3efe60fdd2 C++: Accept test changes. 2021-10-28 12:35:01 +01:00
Mathias Vorreiter Pedersen
3a488574e5 C++: Rewrite the PartialDefinitionNode classes to match the new StoreNodes. 2021-10-28 12:35:00 +01:00
Geoffrey White
2e61ae244a C++: Set literals. 2021-10-13 16:12:36 +01:00
Mathias Vorreiter Pedersen
0679142607 C++: Accept test changes. 2021-10-01 18:27:55 +02:00
Anders Fugmann
c9c41252e3 C++: Update test results in SimpleRangeAnalysis 2021-09-24 12:23:48 +02:00
Anders Fugmann
d7afd86a27 C++: Add test case exposing problem with overflows for upperBound predicate 2021-09-24 11:44:05 +02:00
Anders Peter Fugmann
1bbadb57a2 Merge pull request #6568 from andersfugmann/andersfugmann/improve_upper_bound
C++: Improve predicate upperBound in SimpleRangeAnalysis
2021-09-10 09:49:48 +02:00
Anders Fugmann
270dbd2bf7 C++: Revert peer review suggestion.
The suggested change has a severe impact on row counts, as cpp does not cache
the results for `bbDominates`. Since the `getGuardedUpperBound` predicate the
cost of runtime complexity is considered higher than the benefit of this change.
2021-09-09 13:26:42 +02:00
Anders Fugmann
6c44b0e6e7 C++: Add test case where a guarded block has two predecessors which are both in the dominance domain of the guard 2021-09-09 13:18:49 +02:00
Anders Schack-Mulligen
f30dad7705 Dataflow: Update test expected outputs. 2021-09-07 13:02:20 +02:00
Anders Fugmann
ddbaf585ec Merge branch 'main' into andersfugmann/improve_upper_bound 2021-09-06 10:32:44 +02:00
Dave Bartolomeo
d1e6813812 Make side effects for constructor calls use same mechanism as other arguments
This commit is yet another step to fixing the order of IR side effect instructions. Instead of having a special `StructorCallSideEffects` class for the call itself, I've introduced a `TranslatedStructorCallQualifierSideEffect` class that shares a bunch of common code with `TranslatedArgumentExprSideEffect`, but handles the case where there's no `Expr` for the qualifier of the constructor call. Because this class uses the same ordering as regular argument side effects, these side effects now appear in the correct order, reads before writes.

The test expectations have changed to reflect the new, correct order.
2021-09-03 16:58:32 -04:00
Anders Fugmann
d962fc4ce1 C++: Improve predicate upperBound in SimpleRangeAnalysis
If an expression has an immediate guardPhi node, this is used as a strict upper bound
2021-09-02 21:46:18 +02:00
Anders Fugmann
c110508b4e C++: Add tests to expose potential improvements available to SimpleRangeAnalysis 2021-09-02 21:20:33 +02:00
Alexandre Boulgakov
10bc2568b7 C++: Add support for default member initializers. 2021-08-26 12:32:30 +01:00
Alexandre Boulgakov
89e52bf500 C++: Move element tests to internal repo. 2021-08-19 09:48:13 +01:00
Alexandre Boulgakov
1eb804a072 Merge pull request #6496 from sashabu/sashabu/c_linkage
C++: Allow querying for "C" language linkage on routine types.
2021-08-18 17:46:44 +01:00
Alexandre Boulgakov
3ba308a69f C++: Allow querying for "C" language linkage on routine types. 2021-08-18 15:35:30 +01:00
Anders Fugmann
0b98b39f91 C++: Test dataflow tests for strdupa and strndupa functions 2021-08-18 15:22:14 +02:00
Alexandre Boulgakov
490498899b C++: Expose trailing return type presence. 2021-08-11 16:04:07 +01:00
Mathias Vorreiter Pedersen
bbbbeda7c3 Merge pull request #6385 from MathiasVP/more-FieldConfiguration-sources
C++: Fix missing local flow in AST dataflow
2021-08-02 15:22:07 +02:00
Mathias Vorreiter Pedersen
bbb38fd2aa C++: Accept more test changes. 2021-07-29 15:49:50 +02:00
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