Commit Graph

4102 Commits

Author SHA1 Message Date
Robert Marsh
1445b31864 C++: QLDoc for Operand 2020-09-24 16:34:16 -07:00
Robert Marsh
e51b9215e4 C++: QLDoc for Overlap in IR construction 2020-09-24 15:56:29 -07:00
Robert Marsh
e9b1d817c7 C++: QLDoc for VirtualVariable in IR construction 2020-09-24 15:55:57 -07:00
Robert Marsh
46ff4d524f C++: autoformat 2020-09-24 14:54:31 -07:00
Robert Marsh
ca06637de0 C++: add qldoc comment 2020-09-24 10:40:45 -07:00
Geoffrey White
ec3c1568d2 C++: Model erase. 2020-09-24 18:38:29 +01:00
Geoffrey White
8b91d5077d C++: Model find. 2020-09-24 18:38:29 +01:00
Geoffrey White
d550741c0c C++: Model insert_or_assign. 2020-09-24 18:38:28 +01:00
Geoffrey White
c51294e423 C++: Model operator[] and at. 2020-09-24 18:38:28 +01:00
Geoffrey White
13b15d9bcd C++: Model swap. 2020-09-24 18:38:27 +01:00
Geoffrey White
6119bf3430 C++: Model begin and end. 2020-09-24 18:38:27 +01:00
Geoffrey White
25e0c680c6 C++: Model insert. 2020-09-24 18:38:27 +01:00
Robert Marsh
094b06ec2a C++: remove unneeded predicate 2020-09-24 10:37:38 -07:00
Geoffrey White
0dca7f81bc C++: Model std::swap. 2020-09-24 15:49:33 +01:00
Jonas Jensen
e012dce755 Merge pull request #4334 from github/faster-skip-copy-value-instructions
C++: Manual recursion in `skipCopyValueInstructions`
2020-09-24 16:43:25 +02:00
Robert Marsh
89332ca303 C++: autoformat 2020-09-23 15:29:51 -07:00
Robert Marsh
774dcc7c52 C++: New model class for iterator op* and op[] 2020-09-23 15:29:37 -07:00
Mathias Vorreiter Pedersen
f794eaa670 C++: Manual recursion in skipCopyValueInstructions instead of transitive closure 2020-09-23 16:26:40 +02:00
Jonas Jensen
b7d0939f4a C++: ExtendedRangeAnalysis stub implementation
Just to demonstrate how things fit together, I've created
`SubtractSelf.qll` that adds a (hopefully sound) version of the test
extension that was already used in `extensibility.ql`.
2020-09-23 15:50:07 +02:00
Robert Marsh
e28a45b8e6 Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
Resolve test output conflicts from IR model improvements
2020-09-22 11:17:38 -07:00
Jonas Jensen
d1f453be36 C++: import SimpleRangeAnalysisInternal
This ensures that `getFullyConverted{Lower,Upper}Bounds` are available
where they need to be called.
2020-09-22 15:54:54 +02:00
Jonas Jensen
8065bf15ad C++: Per-variable overrides
Without these changes, there was no way to tell which variables were
overridden by a given instance of `SimpleRangeAnalysisDefinition`. All
four overrides are needed because they fit into different mutual
recursions of the `SimpleRangeAnalysis` implementation.
2020-09-22 15:53:22 +02:00
Jonas Jensen
7dce4d0a6e C++: Rename: name the file the same as the class 2020-09-22 15:48:36 +02:00
Jonas Jensen
ee211b02fb Merge remote-tracking branch 'lcartey/cpp/range-analysis-custom-defs' into range-analysis-custom-defs 2020-09-22 13:27:56 +02:00
Jonas Jensen
269b7101c0 Merge pull request #4273 from lcartey/cpp/custom-range-analysis-override
C++: Support overriding existing simple range analysis bounds
2020-09-22 13:15:05 +02:00
Jonas Jensen
e86bc0c6ac C++: Autoformat fixup 2020-09-22 11:53:05 +02:00
Jonas Jensen
5cbf498a2d Merge pull request #4302 from MathiasVP/fix-field-conflation-after-4230
C++: Fix field conflation after #4230
2020-09-22 10:23:17 +02:00
Robert Marsh
9e3bfe1968 C++: Fix iterator flow context sensitivity 2020-09-21 16:17:16 -07:00
Robert Marsh
947ad02db9 C++: autoformat 2020-09-21 11:38:57 -07:00
Mathias Vorreiter Pedersen
873e871620 C++: Handle more cases in arrayReadStep. 2020-09-21 14:35:37 +02:00
Mathias Vorreiter Pedersen
62d42f20d9 C++: use(x) is no longer an array read. 2020-09-21 12:46:03 +02:00
Mathias Vorreiter Pedersen
c560c7584c C++: Add QLDoc for BufferMayWriteSideEffectFieldStoreQualifierNode 2020-09-21 11:08:06 +02:00
Mathias Vorreiter Pedersen
6dd7675a97 Update cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
Co-authored-by: Jonas Jensen <jbj@github.com>
2020-09-21 09:31:30 +02:00
Robert Marsh
6b3557ec58 C++: cache localAdditionalTaintStep 2020-09-18 15:42:14 -07:00
Robert Marsh
bc3e74f7d6 Merge branch 'main' into rdmarsh2/cpp/ir-qualifier-flow
Fix test conflicts
2020-09-18 15:40:43 -07:00
Robert Marsh
c179a07fc7 C++: fix constructor models 2020-09-18 14:43:39 -07:00
Robert Marsh
bd7f5a41d1 C++: autoformat 2020-09-18 14:19:29 -07:00
Robert Marsh
b84bf5e9bb C++: QLDoc for IteratorPartialDefinitionNode 2020-09-18 14:18:38 -07:00
Robert Marsh
107e9770da C++: remove accidentally committed test code 2020-09-18 14:12:33 -07:00
Mathias Vorreiter Pedersen
b6b17fe95e C++: Add a read and store step that replace ArrayContent with FieldContent when we realize that the target of a store is a field. 2020-09-18 17:12:09 +02:00
Jonas Jensen
6463a94258 Merge pull request #4297 from github/igfoo/compileTimeConstantInt
C++: Improve `compileTimeConstantInt`
2020-09-18 13:58:16 +02:00
Jonas Jensen
c67605f15c Merge pull request #4230 from MathiasVP/mathiasvp/array-field-flow
C++: Replace `field -> object` taint rule with `ArrayContent` dataflow
2020-09-18 10:56:51 +02:00
Mathias Vorreiter Pedersen
8c615ece8a Merge pull request #4292 from MathiasVP/mathiasvp/cache-simpleLocalFlowStep
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-18 10:18:21 +02:00
Mathias Vorreiter Pedersen
3ef6e8a580 Merge pull request #4283 from geoffw0/stringstream4
C++: Model getline
2020-09-18 10:17:47 +02:00
Robert Marsh
3a83cc71fe C++: use qualifier flow in more models 2020-09-17 18:03:02 -07:00
Robert Marsh
556ace004f C++: use qualifiers in string constructor model 2020-09-17 17:39:50 -07:00
Robert Marsh
6b7b64d7be C++: IR data and taint flow through qualifiers 2020-09-17 17:10:11 -07:00
Mathias Vorreiter Pedersen
c6ff805a07 C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep 2020-09-17 21:13:02 +02:00
Mathias Vorreiter Pedersen
8e1d9e0996 C++: Fix bad join order introduced by #4270 2020-09-17 19:23:01 +02:00
Ian Lynagh
c7b6374e55 C++: Improve compileTimeConstantInt
It is possible for the frontend to make
    (bool)e
where e has a constant value 0, but the (implicit) cast has no constant
value. This was causing us to not understand assume(0) correctly.

Now compileTimeConstantInt will handle casts itself if necessary.
2020-09-17 14:51:50 +01:00