Commit Graph

8876 Commits

Author SHA1 Message Date
calum
2acde22f43 C#: Add QL and tests for handles. 2018-12-19 15:22:53 +00:00
calum
0ee209e6a4 C#: Update db stats. 2018-12-19 15:22:53 +00:00
calum
fb8895bdc7 C#: Extract metadata handle information. 2018-12-19 15:22:53 +00:00
Tom Hvitved
10627738d0 C#: Introduce Ssa::Definition::getElement() and AssignableDefinition::getElement() 2018-12-19 14:56:56 +01:00
calumgrant
e15481a622 Merge pull request #702 from hvitved/csharp/remove-deprecated
C#: Remove deprecated predicates
2018-12-19 12:10:49 +00:00
calum
6a54a6d3e5 C#: Fix changed unit tests. 2018-12-19 11:03:05 +00:00
calum
93ce34ad58 C#: Add a new object->entity cache. 2018-12-19 10:40:07 +00:00
calum
88734f1f8a C#: Fix label conflicts.
C#: Remove unnecessary code from Property.
2018-12-19 10:40:07 +00:00
calum
a7cdf528dd C#: Improve performance by mapping directly from entities to labels. 2018-12-19 10:40:06 +00:00
Tom Hvitved
e5cbac5c13 C#: Replace a use of boundedFastTC with fastTC 2018-12-19 11:37:22 +01:00
calumgrant
b051b7546d Merge pull request #638 from hvitved/csharp/split-dominance-performance
C#: Speedup `Assertions::strictlyDominates()` and `ControlFlowElement::controlsBlock()`
2018-12-18 13:05:36 +00:00
Tom Hvitved
edf1df1577 C#: Remove tests for deprecated predicates 2018-12-18 10:43:12 +01:00
Tom Hvitved
d9ae5933d4 C#: Remove deprecated predicates 2018-12-17 16:20:41 +01:00
Tom Hvitved
e14259126e Merge pull request #658 from calumgrant/cs/extractor/for-is
C#: Fix extraction bug for variable declarations in for condition
2018-12-17 16:16:00 +01:00
Tom Hvitved
e822510d6b C#: Fix typo 2018-12-17 15:33:05 +01:00
calumgrant
6648c8414f Merge pull request #680 from hvitved/csharp/data-flow-performance-tweaks
C#: Minor data flow performance tweaks
2018-12-17 14:25:51 +00:00
calumgrant
dbd0c7e80a Merge pull request #674 from hvitved/csharp/cache-get-label
C#: Cache `NamedElement::getLabel()`
2018-12-17 14:24:01 +00:00
calumgrant
f50d0e373a Merge pull request #642 from hvitved/csharp/extractor/nullness-refactorings
C#: nullness related extractor refactorings
2018-12-17 14:16:51 +00:00
Tom Hvitved
5f269b2d87 Merge branch 'master' into cs/extractor/for-is 2018-12-17 11:14:50 +01:00
Tom Hvitved
ada0115d6a C#: Remove getUrl() predicates
As described on https://lgtm.com/help/ql/locations#providing-location-information,
there is no need to provide a `getUrl()` predicate, when there is a `getLocation()`
predicate. Not only is it redundant, but it can also be slow because of string
construction.
2018-12-17 10:52:24 +01:00
Tom Hvitved
91e4f7ad83 C#: Make cs/dereferenced-value-may-be-null a path query 2018-12-14 12:07:16 +00:00
Tom Hvitved
e2f271bddb C#: Add more guard implication steps 2018-12-14 12:03:32 +00:00
Tom Hvitved
078dc7b6c0 C#: Fix false positives in cs/dereferenced-value-may-be-null 2018-12-14 12:03:32 +00:00
Tom Hvitved
287ce4e683 C#: Add more nullness tests 2018-12-14 12:03:32 +00:00
Tom Hvitved
654f2ae290 C#: Address review comment 2018-12-14 10:38:34 +00:00
Aditya Sharad
7bc729a7dc Merge master into next. 2018-12-14 10:16:47 +00:00
Tom Hvitved
56b80ae13a C#: Add getALocation() for namespaces and namespace declarations 2018-12-14 10:16:20 +00:00
Tom Hvitved
b11d5c5075 Merge pull request #679 from calumgrant/cs/omitted-array-size
C#: Extract stackalloc initializers
2018-12-14 07:48:46 +01:00
Aditya Sharad
f71e5ac338 Merge master into next. 2018-12-13 17:57:31 +00:00
calum
9fba643fb0 C#: Address review comments. 2018-12-13 13:53:58 +00:00
calumgrant
16c065274d Merge pull request #666 from hvitved/csharp/useless-upcast-performance
C#: Improve performance of `cs/useless-upcast`
2018-12-13 12:04:12 +00:00
Tom Hvitved
b155a0f5fb C#: Avoid computing CIL strings and non-PDB locations in data flow library
Computing strings and locations for CIL instructions can be quite time consuming.
The CIL `toString()`s are not very helpful in path explanations, and their locations
are only useful when a PDB source file exists. Therefore, produce a simple constant
`toString()`, and restrict locations to those in PDB files.
2018-12-12 21:58:16 +01:00
Tom Hvitved
344466a8c1 C#: Cache DataFlow::Node::getEnclosingCallable() 2018-12-12 21:49:21 +01:00
Aditya Sharad
f92456fcad Merge master into next.
Conflict in `cpp/ql/test/library-tests/sideEffects/functions/sideEffects.expected`,
resolved by accepting test output (combining changes).
2018-12-12 17:26:18 +00:00
Aditya Sharad
41a48078f7 Merge pull request #673 from calumgrant/cs/sync-files
C#: Sync samples and qltest cases
2018-12-12 17:10:00 +00:00
calumgrant
8e546a30b0 Merge pull request #637 from hvitved/csharp/cfg/throwing-callable
C#: Fix a bug in `ThrowingCallable`
2018-12-12 16:58:28 +00:00
calum
2bbd55519b C#: Add tests for C# 7.3 features. 2018-12-12 16:44:55 +00:00
Tom Hvitved
74167e478a C#: Cache NamedElement::getLabel() 2018-12-12 13:16:28 +01:00
Tom Hvitved
6918dad1db C#: Refactor localFlowStep()
Using the `forceCachingInSameStage()` trick, we can get rid of the non-cached version
of local flow, while still computing it in the same stage.
2018-12-12 13:14:22 +01:00
Tom Hvitved
1366638f06 C#: Fix whitespaces 2018-12-12 13:13:13 +01:00
calum
3037b2b197 C#: Sync the -Good and -Bad files in the qltest to match the sample. 2018-12-12 11:36:00 +00:00
calum
1df1b0c28e C#: Refactor ArrayCreations to allow stackalloc arrays to have initializers (C# 7.3). 2018-12-12 11:05:34 +00:00
Tom Hvitved
7422947e78 C#: Improve performance of cs/useless-upcast 2018-12-11 17:48:04 +01:00
Tom Hvitved
e80837681f C#: Refactor LINQ logic
Factor `ClauseCall` out into three classes to make it clear when the fields
`operand` and `declaration` can be `null`.
2018-12-11 16:04:25 +01:00
Aditya Sharad
dde42a5723 Merge rc/1.19 into next. 2018-12-11 14:38:58 +00:00
calum
8d072863df C#: Reorder for statements to ensure variables declared in the condition are declared before they are used. 2018-12-11 10:31:45 +00:00
Tom Hvitved
1e9fe0046a C#: Address review comments 2018-12-10 15:31:23 +01:00
calumgrant
67d4099e3f Merge pull request #593 from hvitved/csharp/nullness
C#: Rewrite nullness queries
2018-12-07 15:57:27 +00:00
Tom Hvitved
6411d1c7dd C#: Refactor operator call logic
Refactored to make it clear when `@operator.Symbol as IMethodSymbol` can be `null`.
2018-12-07 15:47:20 +01:00
Tom Hvitved
e05bbb0f10 C#: Fix always-null bug in TRAP writer 2018-12-07 15:46:27 +01:00