Commit Graph

36554 Commits

Author SHA1 Message Date
AndreiDiaconu1
21513102f7 Compiler generated constructor
Fixed a problem when the translating the compiler generated constructors that caused some sanity errors (since they have no body, when translating the constructor block fragmentation happened). Fixed this by skipping the translation of the body, if it does not exist (when translating a function).
2019-09-27 12:20:39 +01:00
Rasmus Wriedt Larsen
fc59b10ba4 Python: Autoformat (4 spaces) django library 2019-09-27 13:15:28 +02:00
Rasmus Wriedt Larsen
f4e0abd4c4 Python: Modernise django library 2019-09-27 13:14:52 +02:00
Rasmus Wriedt Larsen
bc8e4d2005 Python: Autoformat (4 spaces) cherrypy library 2019-09-27 13:06:09 +02:00
Taus Brock-Nannestad
9878e4fe26 Python: Apply four-space autoformat. 2019-09-27 13:04:17 +02:00
Taus Brock-Nannestad
4341e88fc4 Python: Clean up comments in preparation for autoformat. 2019-09-27 13:03:27 +02:00
Matthew Gretton-Dann
cc016d583d C++: Add further vector_size attribute tests 2019-09-27 11:28:31 +01:00
Matthew Gretton-Dann
c10ed5e114 C++: Update results for vector_size atrr changes 2019-09-27 11:28:31 +01:00
Taus Brock-Nannestad
25985e901b Python: Remove a few false positives from py/unused-import. 2019-09-27 11:46:59 +02:00
Rasmus Wriedt Larsen
ff28b3f1b4 Python: Modernise cherrypy library 2019-09-27 11:23:33 +02:00
Felicity Chapman
91a8391c84 Merge pull request #2037 from jf205/python-docs-fixes
docs: fix some formatting issues
2019-09-27 08:47:49 +01:00
Dave Bartolomeo
9b8b364c8f Merge from master 2019-09-26 22:15:02 -07:00
Dave Bartolomeo
c389432922 C++, C#: Sync IRType.qll between languages 2019-09-26 22:11:24 -07:00
Dave Bartolomeo
c8d154e9cc C#: Fix dump of IR types 2019-09-26 15:54:09 -07:00
Dave Bartolomeo
e30e163081 C#: Implement IRType
This commit implements the language-neutral IR type system for C#. It mostly follows the same pattern as C++, modified to fit the C# type system. All object references, pointers, and lvalues are represented as `IRAddress` types. All structs and generic parameters are implemented as `IRBlobType`. Function addresses get a single `IRFunctionAddressType`.

I had to fix a couple places in the original IR type system where I didn't realize I was still depending on language-specific types. As part of this, `CSharpType` and `CppType` now have a `hasUnspecifiedType()` predicate, which is equivalent to `hasType()`, except that it holds only for the unspecified version of the type. This predicate can go away once we remove the IR's references to the underlying `Type` objects.

All C# IR tests pass without modification, but only because this commit continues to print the name of `IRUnknownType` as `null`, and `IRFunctionAddressType` as `glval<null>`. These will be fixed separately in a subsequent commit in this PR.
2019-09-26 15:47:52 -07:00
Dave Bartolomeo
28aa7dcae2 C++: Fix PR feedback 2019-09-26 13:56:43 -07:00
Geoffrey White
18b28b1b57 Merge pull request #1959 from jbj/const-pmf
C++: Classify more expressions as constant
2019-09-26 17:13:27 +01:00
AndreiDiaconu1
a7a5eaa23f Address PR comments 2019-09-26 16:49:18 +01:00
Anders Schack-Mulligen
f97958296d Java/C++/C#: Sync. 2019-09-26 17:12:08 +02:00
james
3a4cef646d docs: fix some formatting issues 2019-09-26 16:04:01 +01:00
Erik Krogh Kristensen
7fb8f8453d fix for when the concatenation root is in parentheses 2019-09-26 16:35:38 +02:00
Rasmus Wriedt Larsen
4a5aae0db8 Python: autoformat (4 spaces) NonCls.ql NonSelf.ql 2019-09-26 16:31:14 +02:00
Rasmus Wriedt Larsen
457794e030 Python: Consistenly use parameter instead of argument in docs
The Python 3 FAQ states that this is the right thing [0]

It sadly doesn't align 100% with PEP8, which calls them for "arguments" [1], but
after discussion with Taus, we decided to go with "parameter" everywhere to be
consistent.

[0] https://docs.python.org/3/faq/programming.html#faq-argument-vs-parameter
[1] https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments
2019-09-26 16:31:09 +02:00
Anders Schack-Mulligen
0afea80d53 Java: Improve guards for equal ssa variables. 2019-09-26 16:29:13 +02:00
Anders Schack-Mulligen
4221639155 Java: Improve taint/value distinction for flow through with fields. 2019-09-26 16:25:15 +02:00
Calum Grant
e1594a4b0b Merge pull request #2017 from AndreiDiaconu1/ircsharp-various
C# IR: Some minor additions
2019-09-26 15:02:59 +01:00
Rasmus Wriedt Larsen
41f16aaf7a Python: Autoformat (4 spaces) bottle library 2019-09-26 15:05:51 +02:00
Rasmus Wriedt Larsen
12c49031e8 Python: Modernise bottle library 2019-09-26 15:03:47 +02:00
Max Schaefer
1e7b4c2989 Merge pull request #1953 from asger-semmle/typescript-call-signature-api
TS: Make overload index and functions signature more available
2019-09-26 12:42:04 +01:00
Rasmus Wriedt Larsen
546405a379 Python: Add more tests for cls/self argument names 2019-09-26 13:25:14 +02:00
Rasmus Wriedt Larsen
5271d6a063 Python: Add min/max #parameters to FunctionValue
So we don't loose this information on the newly migrated/modernise zope
interface
2019-09-26 13:25:14 +02:00
Rasmus Wriedt Larsen
a81bf720f5 Python: Modernise the py/not-named-self query. 2019-09-26 13:25:14 +02:00
Rasmus Wriedt Larsen
c6d9eb9254 Python: Move more tests for argument names into own file
Plus fixup of expected output from unrelated tests
2019-09-26 13:25:14 +02:00
Rasmus Wriedt Larsen
3f974fbc14 Python: Modernise the py/not-named-cls query. 2019-09-26 13:25:14 +02:00
Erik Krogh Kristensen
69365ccd03 remove false positive in missingSpaceInAppend by requring the presence of a word-like fragment 2019-09-26 12:59:05 +02:00
AndreiDiaconu1
0999780d82 Address PR comments 2019-09-26 11:51:54 +01:00
AndreiDiaconu1
3a5140c0f5 Indexers and events
Added test for indexers.
Added support for event accesses and added test.
2019-09-26 11:46:16 +01:00
AndreiDiaconu1
16d8d2efa1 Remove useless translation 2019-09-26 11:46:16 +01:00
shati-patel
d4fa14a177 Merge pull request #2030 from jf205/python-docs-fixes
Learn QL: QL for Python doc fixes for 1.22
2019-09-26 10:54:21 +01:00
Rasmus Wriedt Larsen
94d876e8a3 Learn QL: Fix query link in Python Points-to tutorial
(cherry picked from commit c6c565bc37)
2019-09-26 10:44:29 +01:00
Rasmus Wriedt Larsen
9511465f04 Learn QL: Minor formatting fix in python/statements-expressions
(cherry picked from commit c47a4e0c44)
2019-09-26 10:44:29 +01:00
jf205
47a094239c Merge pull request #2028 from RasmusWL/learnql-fix-formatting
Learn QL: Minor formatting fix in python/statements-expressions
2019-09-26 10:34:31 +01:00
Asger F
c2f6855a7b JS: Update tests 2019-09-26 10:17:58 +01:00
Asger F
cafa9edf69 JS: upgrade script, stats, version string 2019-09-26 10:17:58 +01:00
Asger F
b4f67f20af JS: Extract types and signatures for functions 2019-09-26 10:17:58 +01:00
Asger F
999d10e1f0 JS: Use consistent indentation 2019-09-26 10:17:58 +01:00
Asger F
405d43d539 JS: Merge CallSignatureTypes test 2019-09-26 10:17:58 +01:00
Asger F
97494290de JS: Add getOverloadIndex() 2019-09-26 10:17:58 +01:00
Asger F
8ca294ae41 JS: Merge TypeScript/CallSignatures test 2019-09-26 10:17:58 +01:00
Rasmus Wriedt Larsen
c47a4e0c44 Learn QL: Minor formatting fix in python/statements-expressions 2019-09-26 11:16:24 +02:00