Ian Lynagh
4442fd8407
C++: Accept changes to syntax-zoo tests
2019-11-15 14:42:36 +00:00
Ian Lynagh
2cf714a923
C++: Follow changes in lambda locations
2019-11-15 14:42:36 +00:00
Ian Lynagh
8e00516ecf
C++: Accept changes in ir test
2019-11-15 14:42:36 +00:00
Jonas Jensen
73d9cc2e7b
Merge pull request #2309 from geoffw0/cpp418
...
CPP: QLDoc enhancements
2019-11-15 08:46:08 +01:00
Dave Bartolomeo
81262d5948
Merge pull request #2328 from geoffw0/routinetest
...
CPP: Add a quick test of RoutineType.
2019-11-14 15:49:13 -07:00
Robert Marsh
facbd32062
Merge branch 'master' into rdmarsh/cpp/ir-callee-side-effects
2019-11-14 11:09:13 -08:00
Robert Marsh
2fb1d4d1b1
C++: fix IR return block successors
2019-11-14 10:29:48 -08:00
Geoffrey White
7408726f41
Merge pull request #2312 from jbj/pointer-wraparound-query
...
C++: New query: Pointer overflow check
2019-11-14 16:13:04 +00:00
Geoffrey White
dc34fa366c
CPP: Add a test of RoutineType.
2019-11-14 15:13:52 +00:00
Dave Bartolomeo
08620046ab
Merge pull request #2068 from rdmarsh2/rdmarsh/cpp/ir-constructor-side-effects
...
C++: side effect instrs for constructor qualifiers
2019-11-13 14:56:24 -07:00
Geoffrey White
32b5501177
CPP: Add a test of ErroneousType.
2019-11-13 18:53:43 +00:00
Jonas Jensen
8d79634f8c
C++: Factor out isFromMacroDefinition predicate
...
This trick for excluding elements from macro bodies but not macro
arguments looks promising and should probably be used much more. With
this commit, it's now easy to use from any query.
Performance is still good because the new predicate gets appropriately
magiced.
2019-11-13 14:07:33 +01:00
Robert Marsh
47f87c214c
Merge branch 'master' into rdmarsh/cpp/ir-constructor-side-effects
2019-11-12 10:31:04 -08:00
Ziemowit Laski
faf4342d8e
[CPP-418] Update references to BuiltInOperationBuiltInOffsetOf and __builtin_offsetof.
2019-11-12 17:35:50 +00:00
Jonas Jensen
eb55d964a8
C++: Fix semantic merge conflict
...
This test output must have been wrong because I produced it with an
extractor that didn't have #2153 applied.
2019-11-11 15:39:53 +01:00
Jonas Jensen
279fc16b60
C++: ConvertToBase -> ConvertToNonVirtualBase
...
This rename was done with
perl -p -i -e's/ConvertToBase/ConvertToNonVirtualBase/g' **/*.ql* **/*.expected
followed by re-running the affected tests.
2019-11-10 10:35:53 +01:00
Robert Marsh
64b34ad975
Merge branch 'master' of github.com:Semmle/ql into rdmarsh/cpp/ir-constructor-side-effects
2019-11-08 14:06:36 -08:00
Robert Marsh
1dc0cb89d0
Merge branch 'master' of github.com:Semmle/ql into rdmarsh/cpp/ir-constructor-side-effects
2019-11-08 12:47:27 -08:00
Dave Bartolomeo
c365b2f2f0
Merge from master
...
Resolve conflicts in test output
2019-11-08 10:42:29 -07:00
Dave Bartolomeo
17f76c2516
C++: Fix merge conflicts
2019-11-07 22:02:15 -07:00
Robert Marsh
2582b69e17
Merge branch 'master' of github.com:Semmle/ql into rdmarsh/cpp/ir-constructor-side-effects
2019-11-07 15:46:08 -08:00
Robert Marsh
e93dcdb16c
Merge branch 'master' into rdmarsh/cpp/ir-constructor-side-effects
2019-11-07 15:19:46 -08:00
Robert Marsh
f483ec152b
Merge branch 'master' of github.com:Semmle/ql into rdmarsh/cpp/uninit-string-initializers
2019-11-07 14:36:58 -08:00
Robert Marsh
ae1377447e
C++: only generate uninits when needed
2019-11-07 13:55:49 -08:00
Dave Bartolomeo
6c1d219c86
Merge from master
2019-11-07 14:50:04 -07:00
Robert Marsh
c5396d9980
Merge pull request #2262 from jbj/ir-virtual-dispatch-local
...
C++: Rudimentary support for IR data flow virtual dispatch
2019-11-07 13:09:24 -08:00
Dave Bartolomeo
f808dcefab
Merge pull request #2277 from ian-semmle/cfg_diffs
...
C++: Remove tests for CFG differences
2019-11-07 12:41:40 -07:00
Dave Bartolomeo
64480c2ace
Merge pull request #1999 from jbj/ir-copy-unloaded-result
...
C++: Make sure there's a Instruction for each Expr
2019-11-07 12:31:54 -07:00
Ian Lynagh
b5af4e5acd
C++: Remove tests for CFG differences
...
Now that we have switched over, they are no longer interesting.
2019-11-07 16:32:18 +00:00
Matthew Gretton-Dann
ddf1ef8a7d
C++: Add new test case for template member change
...
We now output literals for accesses to members of template parameters:
So for `foo` in the following example:
```
template<typename T> void bar(T& t) {
T.foo(1)
}
```
2019-11-07 14:08:25 +00:00
Matthew Gretton-Dann
c0884e9a88
C++: Update expected results.
2019-11-07 14:08:25 +00:00
Robert Marsh
81ad11090e
C++: uninit instr for string literal initializers
2019-11-06 13:37:03 -08:00
Robert Marsh
51c4ef4f7f
C++: add SSA IR test for array initializers
2019-11-06 13:32:35 -08:00
Dave Bartolomeo
a9e3bfbd11
C++/C#: Treat string literals like read-only global variables for alias purposes.
...
Previously, we didn't track string literals as known memory locations at all, so they all just got marked as `UnknownMemoryLocation`, just like an aribtrary read from a random pointer. This led to some confusing def-use chains, where it would look like the contents of a string literal were being written to by the side effect of an earlier function call, which of course is impossible.
To fix this, I've made two changes. First, each string literal is now given a corresponding `IRVariable` (specifically `IRStringLiteral`), since a string literal behaves more or less as a read-only global variable. Second, the `IRVariable` for each string literal is now marked `isReadOnly()`, which the alias analysis uses to determine that an arbitrary write to aliased memory will not overwrite the contents of a string literal.
I originally planned to treat all string literals with the same value as being the same memory location, since this is the usual behavior of modern compilers. However, this made implementing `IRVariable.getAST()` tricky for string literals, so I left them unpooled.
2019-11-06 13:08:28 -07:00
Jonas Jensen
76a3db9eed
Merge remote-tracking branch 'upstream/master' into ir-copy-unloaded-result
2019-11-06 15:21:22 +01:00
Jonas Jensen
ec9ef33486
C++: IR data flow through inheritance conversions
...
This makes IR data flow behave more like AST data flow, and it makes IR
virtual dispatch work without further changes.
2019-11-06 14:04:07 +01:00
Jonas Jensen
49008c9ff5
C++: IR data flow local virtual dispatch
...
This is just good enough to cause no performance regressions and pass
the virtual-dispatch tests we have for `security.TaintTracking`. In
particular, it fixes the tests for `UncontrolledProcessOperation.ql`
when enabling `DefaultTaintTracking.qll`.
2019-11-06 14:04:02 +01:00
Matthew Gretton-Dann
6fe22a76da
C++: Change API for exposing template parameters.
...
Note that Declaration::getTemplateArgumentType() and
Declaration::getTemplateArgumentValue() need to be public so that they
can be overriden in derived classes.
2019-11-05 11:39:22 +00:00
Matthew Gretton-Dann
45ec8527c3
C++: Update expected test output.
2019-11-05 11:39:22 +00:00
Matthew Gretton-Dann
809d97de02
C++: Print print nontype template params
2019-11-05 11:39:22 +00:00
Matthew Gretton-Dann
ca898d4be0
C++: Further nontype template testcases.
2019-11-05 11:39:22 +00:00
Matthew Gretton-Dann
57cd9b3990
C++: Update test results
...
We now support getting the name used for non-type template parameters
2019-11-05 11:39:22 +00:00
Matthew Gretton-Dann
469832668f
C++: Add some simple non-type template tests
2019-11-05 11:39:22 +00:00
Matthew Gretton-Dann
faf5ba432b
C++: Update expected test results
2019-11-05 11:39:22 +00:00
Geoffrey White
3e8b28a0a8
Merge pull request #2213 from jbj/BarrierGuard
...
C++: Implement DataFlow::BarrierGuard for AST+IR
2019-11-04 11:08:36 +00:00
Robert Marsh
31f25c8cfc
C++: primary instrs for constructor side effects
2019-10-31 11:43:47 -07:00
Robert Marsh
86b5e97f76
Merge branch 'master' of github.com:Semmle/ql into rdmarsh/cpp/ir-constructor-side-effects
2019-10-31 11:34:22 -07:00
Robert Marsh
9477bd5698
Merge branch 'master' of github.com:Semmle/ql into rdmarsh/cpp/ir-buffer-read-call-se
2019-10-31 11:00:01 -07:00
Jonas Jensen
b6038f3caa
C++: Remove best-bound logic from test
...
This logic, in an improved form, is now part of the library itself.
2019-10-29 11:54:32 +01:00
Jonas Jensen
311963906b
C++: Only give the best delta in range analysis
...
This mirrors Java's 6b85fe087a .
2019-10-29 11:49:49 +01:00