Commit Graph

17228 Commits

Author SHA1 Message Date
Dave Bartolomeo
5259f86e32 Accept diff (needs further investigation, though) 2020-10-21 18:06:34 -04:00
Dave Bartolomeo
ee18db7b36 Fix IR for member accesses on prvalues
This fixes the IR generation for member accesses where the qualifier is a prvalue that is _not_ the load of a `TemporaryObjectExpr`. We synthesize a temporary variable during IR generation instead. It fits into the IR construction code at the same spot as `TranslatedLoad`, since it's basically the opposite of `TranslatedLoad` (prvalue->glvalue instead of vice versa). Note that array prvalues require special treatment.

This fixes some consistency errors in the `syntax-zoo`. It introduces three new ones in `dataflow-ir-consistency.expected`, but those are along the same lines as tons of existing failures.
2020-10-21 13:32:15 -04:00
Dave Bartolomeo
98e0ae4865 Add tests for member accesses on temporary objects 2020-10-20 17:35:12 -04:00
Dave Bartolomeo
08af0803ff Add examples to QLDoc comment 2020-10-20 17:34:46 -04:00
Dave Bartolomeo
c739f98f7d Merge remote-tracking branch 'upstream/main' into work 2020-10-20 13:42:42 -04:00
Dave Bartolomeo
8c8daa38ec Update stats 2020-10-20 13:41:52 -04:00
Erik Krogh Kristensen
996488511c Merge pull request #4520 from erik-krogh/LessTests
JS: Aggregate tests cases
2020-10-20 19:03:47 +02:00
Dave Bartolomeo
4ba281731c Fix IR generation for member access with a prvalue on the RHS
For historical reasons, the extractor marks the temporary object expression used as the qualifier of a member access as a prvalue(load), even though the current C++ standard says that the temporary object materialization results in a glvalue. Added some special handling to ignore the load for both field accesses and member function calls.

This fixes all of the consistency failures in our regular tests, and all of the related failures in `syntax-zoo` other than the ones that deal with pointers-to-member, which aren't really supported yet anyway.
2020-10-20 12:53:47 -04:00
Dave Bartolomeo
735c657326 IR consistency checks for FieldAddress and this arguments that are not actually addresses.
Exposes failures in existing tests. Also added a small test case for `FieldAddress` on a prvalue.
2020-10-20 10:32:28 -04:00
CodeQL CI
7ea8652f49 Merge pull request #4521 from erik-krogh/moreMiddle
Approved by asgerf
2020-10-20 07:14:14 -07:00
Erik Krogh Kristensen
e061c6a006 add support for more custom CSRF checking middlewares 2020-10-20 15:16:14 +02:00
yoff
17155b64f5 Merge pull request #4514 from tausbn/python-add-module-boundary-flow-steps
Python: Add module boundary flow steps
2020-10-20 14:36:10 +02:00
Erik Krogh Kristensen
05d4858d4f autoformat 2020-10-20 14:27:09 +02:00
CodeQL CI
d2282fc474 Merge pull request #4517 from erik-krogh/logAssign
Approved by esbena
2020-10-20 05:24:49 -07:00
Erik Krogh Kristensen
1096cb0708 aggregate the tests in library-tests/InterProceduralFlow into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
234cb5c67a aggregate the tests in library-tests/JSLint into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
6b86b53a2c aggregate the tests in library-tests/LocalObjects into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
3e3e9de45f aggregate the tests in library-tests/TaintBarriers into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
f8d38227e8 aggregate the tests in library-tests/TypeInference/AnalyzedModule into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
036187cd70 aggregate the tests in library-tests/Util into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
90bb38b522 aggregate the tests in library-tests/variables into a single .ql file 2020-10-20 14:08:55 +02:00
Erik Krogh Kristensen
2707531ddd aggregate the tests in library-tests/Closure into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
15fe0bc38a aggregate the tests in library-tests/Comprehensions into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
0ac55bd521 aggregate the tests in library-tests/Flow into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
b43e21a4c7 aggregate the tests in library-tests/HTML/HTMLElementAndHTMLAttribute into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
003854ebe7 aggregate the tests in library-tests/SensitiveActions into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
d678cc17ba aggregate the tests in library-tests/Templates into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
ad7844a6ac aggregate the tests in library-tests/ClassNode into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
5d401f98a3 aggregate the tests in library-tests/Externs into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
e461c92708 aggregate the tests in library-tests/JSX into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
0c65eee120 aggregate the tests in library-tests/YAML into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
55f130fe62 aggregate the tests in library-tests/AMD into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
10f41878a7 aggregate the tests in library-tests/frameworks/Concepts into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
aece1717aa aggregate the tests in library-tests/frameworks/xUnit into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
771cab233e aggregate the tests in library-tests/frameworks/Firebase into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a3e6054ee5 aggregate the tests in library-tests/frameworks/Electron into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
ed77e055ed aggregate some of the tests in library-tests/frameworks/HTTP-heuristics into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
1e537db103 aggregate the tests in library-tests/frameworks/Vue into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
26a5d62a87 aggregate the tests in library-tests/NPM into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
bc5ed100a0 aggregate the tests in library-tests/Patterns into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a47b8c30d1 aggregate the tests in library-tests/TypeScript/ImportEquals into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
778fbe6f61 aggregate the tests in library-tests/TypeScript/ArrayTypes into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
41b940de69 aggregate the tests in library-tests/TypeScript/ExternalTypes into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
7817ee7611 aggregate the tests in library-tests/TypeScript/BigInts into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
a588f438b6 aggregate the tests in library-tests/TypeScript/LocalTypeResolution into a single .ql file 2020-10-20 14:08:54 +02:00
Erik Krogh Kristensen
deedc8c2d7 aggregate the tests in library-tests/TypeScript/TypeParameters into a single .ql file 2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
c9a0179f42 aggregate the tests in library-tests/TypeScript/Enums into a single .ql file 2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
fcee5fa960 aggregate the tests in library-tests/TypeScript/Modifiers into a single .ql file 2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
1e76471791 aggregate the tests in library-tests/TypeScript/TypeVariableTypes into a single .ql file 2020-10-20 14:08:53 +02:00
Erik Krogh Kristensen
a667b69d91 aggregate the tests in library-tests/NodeJS into a single .ql file 2020-10-20 14:08:53 +02:00