Commit Graph

11975 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
1016a0c0db C++: Generalize charpred of LibcAssert 2020-04-23 09:48:30 +02:00
Robert Marsh
471f536326 Merge pull request #3307 from dbartol/dbartol/BinaryConditional
C++: IR translation for binary conditional operator
2020-04-22 15:01:16 -07:00
Tom Hvitved
5a2dcc591c Merge pull request #3317 from Semmle/revert-2814-cs/unqualify-trap-ids
Revert "C#: Improve db consistency by removing assembly id"
2020-04-22 20:46:35 +02:00
Rebecca Valentine
d5c44d8513 Merge pull request #3315 from tausbn/python-finalise-1.24-change-notes
Python: Finalise change notes for 1.24.
2020-04-22 09:15:54 -07:00
Dave Bartolomeo
163ecd97de Merge pull request #3277 from geoffw0/rangeshift
C++: Support for & and >> in SimpleRangeAnalysis
2020-04-22 11:36:36 -04:00
Felicity Chapman
e29468135d Editorial suggestions
We don't hyphenate "QL-library" and there were a few typos. Feel free to further revise this if I've changed the meaning too much.

As discussed separately, I was unable to raise this as a PR in GitHub.com and had to resort to a direct commit.
2020-04-22 15:48:01 +01:00
Tom Hvitved
8c0c283811 Revert "C#: Improve db consistency by removing assembly id" 2020-04-22 16:32:13 +02:00
Taus
44b570f7b6 Apply suggestions from code review
Co-Authored-By: Felicity Chapman <felicitymay@github.com>
2020-04-22 16:03:20 +02:00
Taus Brock-Nannestad
e97d88c158 Python: Finalise change notes for 1.24. 2020-04-22 14:31:04 +02:00
Dave Bartolomeo
66381e89ef C++: Add comment from PR feedback 2020-04-22 08:11:43 -04:00
Rasmus Wriedt Larsen
1ecfa2eb55 Merge pull request #3278 from tausbn/python-fix-warnings
Python: Fix remaining deprecation warnings.
2020-04-22 11:33:16 +02:00
Taus Brock-Nannestad
2fad5e8e32 Python: Remove deprecated TaintFlow and additionalFlowStepVar. 2020-04-22 10:34:00 +02:00
Calum Grant
1b88c97688 Merge pull request #3199 from hvitved/csharp/vsvars-unset-platform
C#: Unset `Platform` env variable when invoking `vcvarsall.bat`
2020-04-22 09:18:20 +01:00
Geoffrey White
2e392516c2 Apply suggestions from code review
Co-Authored-By: Dave Bartolomeo <dbartol@github.com>
2020-04-22 09:09:16 +01:00
Taus
5af351eacd Merge pull request #3275 from RasmusWL/python-fix-points-to-deprecations
Python: Remove deprecated annotation for old PointsTo::points_to
2020-04-21 18:18:07 +02:00
Dave Bartolomeo
4b44afef90 C++: Accept syntax-zoo test output 2020-04-21 09:42:24 -04:00
Dave Bartolomeo
fee557001e C++: Update SignAnalysis test results 2020-04-21 09:34:44 -04:00
semmle-qlci
2fb711e460 Merge pull request #3169 from erik-krogh/Maps
Approved by asgerf, esbena
2020-04-21 12:12:06 +01:00
Rasmus Wriedt Larsen
32a97266cf Python: Fix deprecation warnings in test output 2020-04-21 11:39:44 +02:00
semmle-qlci
53abf83229 Merge pull request #3304 from asger-semmle/js/typescript-unary-type-expr
Approved by erik-krogh
2020-04-21 10:38:59 +01:00
semmle-qlci
2ecef33c9d Merge pull request #3299 from asger-semmle/js/flows-to-redundant-check
Approved by esbena
2020-04-21 10:00:34 +01:00
semmle-qlci
80c20cb66e Merge pull request #3297 from asger-semmle/js/isambient-refactor
Approved by esbena
2020-04-21 09:36:14 +01:00
semmle-qlci
d75d520f35 Merge pull request #3232 from RasmusWL/python-more-deprecated-annotations
Approved by BekaValentine
2020-04-21 09:30:27 +01:00
Tom Hvitved
29e690e159 Merge remote-tracking branch 'upstream/master' into csharp/vsvars-unset-platform 2020-04-21 09:00:26 +02:00
Tom Hvitved
7d86cce658 Merge pull request #2814 from calumgrant/cs/unqualify-trap-ids
C#: Improve db consistency by removing assembly id
2020-04-21 08:58:34 +02:00
Dave Bartolomeo
1428811f75 C++: IR translation for binary conditional operator
IR generation was not handling the special two-operand flavor of the `?:` operator that GCC supports as an extension. The extractor doesn't quite give us enough information to do this correctly (see github/codeql-c-extractor-team#67), but we can get pretty close.

About half of the code could be shared between the two-operand and three-operand flavors. The main differences for the two-operand flavor are:
1. The "then" operand isn't a child of the `ConditionalExpr`. Instead, we just reuse the original value of the "condition" operand, skipping any implicit cast to `bool` (see comment for rationale).
2. For the three-operand flavor, we generate the condition as control flow rather than the computation of a `bool` value, to avoid creating unnecessarily complicated branching. For the two-operand version, we just compute the value, since we have to reuse that value in the "then" branch anyway.

I've added IR tests for these new cases. I've also updated the expectations for `SignAnalysis.ql` based on the fix. @rdmarsh2, can you please double-check that these diffs look correct? I believe they do, but you're the range/sign analysis expert.
2020-04-21 02:05:21 -04:00
Asger Feldthaus
883846dfb6 JS: Fix extraction of negative number literal types 2020-04-20 16:17:15 +01:00
Jonas Jensen
875daae84b Merge pull request #3151 from dbartol/dbartol/floats
C++: Better support for complex numbers in IR and AST
2020-04-20 16:27:20 +02:00
Calum Grant
41d8d32764 C#: Address review comment: Make dictionary type more specific. 2020-04-20 15:06:42 +01:00
Asger Feldthaus
ca60e8264e JS: Autoformat 2020-04-20 14:42:41 +01:00
Erik Krogh Kristensen
aee7cc117d add change-note 2020-04-20 13:08:51 +02:00
Erik Krogh Kristensen
8b254f7b49 Merge remote-tracking branch 'upstream/master' into Maps 2020-04-20 13:00:39 +02:00
semmle-qlci
e965e5c73e Merge pull request #3094 from erik-krogh/Mispelled
Approved by esbena
2020-04-20 11:41:23 +01:00
Calum Grant
eb1474acee Merge pull request #3276 from hvitved/csharp/dataflow/array-tests
C#: Add data-flow test for collections
2020-04-20 11:36:17 +01:00
Calum Grant
ead916702a C#: Take nullability into account when creating symbol entities. Otherwise, an entity with the wrong (cached) nullability could be created. 2020-04-20 11:29:31 +01:00
Asger Feldthaus
bccc27f1e7 JS: Rephrase flowsTo to avoid redundant SourceNode::Range check 2020-04-20 10:57:52 +01:00
Erik Krogh Kristensen
c713ba7bfe fix typo 2020-04-20 10:51:42 +02:00
Tom Hvitved
e186c9ddd1 C#: Update data-flow collection test method names 2020-04-20 09:29:51 +02:00
Tom Hvitved
161093bd57 C#: Rename arrays data-flow test to collections 2020-04-20 09:20:42 +02:00
Asger Feldthaus
bb9fea5a27 JS: Refactor isAmbient computation 2020-04-19 22:45:19 +01:00
Erik Krogh Kristensen
2632699397 Merge branch 'master' of git.semmle.com:Semmle/ql into Mispelled 2020-04-18 17:58:57 +02:00
Dave Bartolomeo
8041b74f1c C++: Fix formatting 2020-04-18 09:56:38 -04:00
Dave Bartolomeo
de5abdb29a C++/C#: Add missing QLDoc 2020-04-18 09:55:35 -04:00
semmle-qlci
243dea706e Merge pull request #3269 from erik-krogh/Promisify
Approved by esbena
2020-04-18 13:02:42 +01:00
Robert Marsh
9008084b74 Merge pull request #3272 from dbartol/dbartol/DumpFixes
C++: A couple of fixes for IR dumps
2020-04-17 11:49:52 -07:00
Geoffrey White
a7c22db989 C++: Autoformat. 2020-04-17 18:50:41 +01:00
Geoffrey White
de751b0b75 C++: Correct UnsignedBitwiseAndExpr. 2020-04-17 17:10:59 +01:00
Geoffrey White
01d3257d72 C++: Add test cases involving casts. 2020-04-17 17:01:58 +01:00
Jonas Jensen
8ca6c57eef Merge pull request #3118 from MathiasVP/ir-flow-fields
C++: IR field flow
2020-04-17 15:49:19 +02:00
Erik Krogh Kristensen
cffa911661 retarget change note for 1.25 2020-04-17 14:22:57 +02:00