Commit Graph

5466 Commits

Author SHA1 Message Date
Jonas Jensen
f3f89ffe3f Merge pull request #1742 from geoffw0/lambdataint
CPP: Tests for taint through lambdas
2019-08-16 08:45:14 +02:00
Geoffrey White
a6902bdb37 CPP: Test dataflow through lambdas. 2019-08-15 19:43:24 +01:00
Dave Bartolomeo
f1bbc9bb7e Merge pull request #1745 from jbj/ast-field-flow-ABC
C++: Annotate field-flow tests in [ABC].cpp
2019-08-15 09:13:26 -07:00
Dave Bartolomeo
230ff92c03 Merge pull request #1743 from nickrolfe/hmap
C++: delete headermaps test
2019-08-15 09:01:23 -07:00
Geoffrey White
1bd4aeebad CPP: Effects of #1715. 2019-08-15 14:05:09 +01:00
Geoffrey White
02e1edd640 CPP: Test taint through lambdas. 2019-08-15 14:00:45 +01:00
Geoffrey White
b6cf341124 Merge pull request #1715 from jbj/ast-field-flow
C++: Initial AST-based flow through fields
2019-08-15 13:38:58 +01:00
Nick Rolfe
c26aef2381 C++: delete headermaps test 2019-08-15 12:39:58 +01:00
Jonas Jensen
1b4b352316 C++: Field flow through ClassAggregateLiteral 2019-08-15 12:01:42 +02:00
Jonas Jensen
e419ea0140 C++: Test showing no flow through aggregate init 2019-08-15 11:33:25 +02:00
Jonas Jensen
fdd8de79da C++: Remove redundant toString override
This time I left a comment to prevent myself from getting confused again
and adding the override in the future.
2019-08-15 11:32:11 +02:00
Jonas Jensen
ed1e3ed1ef C++: Annotate field-flow tests in [ABC].cpp
This brings the annotation style in sync with how we annotate new tests
these days. I also changed a few annotations to have different expected
outcome based on my understanding of the code.
2019-08-15 10:30:46 +02:00
Jonas Jensen
e94dbe926b C++: Add forgotten toString override
This makes `PostConstructorCallNode`s show up in the test output.
2019-08-14 16:26:49 +02:00
Jonas Jensen
e93598e476 Merge pull request #1716 from geoffw0/qldoceg4
CPP: Add syntax examples to QLDoc in Function.qll
2019-08-13 16:27:20 +02:00
Geoffrey White
e4bbfb9a79 CPP: Corrections. 2019-08-13 11:25:39 +01:00
Jonas Jensen
38ec693ead C++: Improved ConstructorCall field flow
This commit changes C++ `ConstructorCall` to behave like
`new`-expressions in Java: they are both `ExprNode`s and
`PostUpdateNodes`, and there's a "pre-update node" (here called
`PreConstructorCallNode`) to play the role of the qualifier argument
when calling a constructor.
2019-08-13 11:05:13 +02:00
Dave Bartolomeo
5d6ac2bb74 Merge pull request #1583 from jbj/ir-sanity-qlcfg
C++: Share tests between IR and QL-CFG
2019-08-12 07:04:40 -07:00
Dave Bartolomeo
19d2f3a54e Merge pull request #1550 from jbj/array-aggregate-perf
C++ IR: Fix performance of large value-initialized arrays
2019-08-12 06:53:16 -07:00
Jonas Jensen
0652d2a92b Merge pull request #1705 from geoffw0/qldoceg2
CPP: Add syntax examples to QLDoc in Enum.qll.
2019-08-12 13:39:05 +02:00
Geoffrey White
dc1ec635fb CPP: Undo an accidentally committed change to the test. 2019-08-12 11:17:02 +01:00
Jonas Jensen
5724fb0df0 Merge pull request #1706 from geoffw0/qldoceg3
CPP: Add syntax examples to QLDoc in Struct.qll, Union.qll.
2019-08-12 07:57:40 +02:00
Jonas Jensen
b348803a66 Merge pull request #1594 from geoffw0/erafix7
CPP: Add test coverage for LeapYearFieldAccess.isModifiedByArithmeticOperation.
2019-08-09 15:57:35 +02:00
Geoffrey White
67eb37f460 CPP: Update test annotations. 2019-08-09 09:31:47 +01:00
Jonas Jensen
605b56f8ca Merge pull request #1563 from geoffw0/constexprif
CPP: Test cases for EmptyBlock.ql with 'if constexpr'
2019-08-08 20:57:28 +02:00
Geoffrey White
950bc6e3d0 CPP: Brace placement. 2019-08-08 17:51:27 +01:00
Geoffrey White
82bf631541 CPP: Add test cases. 2019-08-08 15:02:56 +01:00
Geoffrey White
ef37893d15 CPP: Improve the MemberFunctions test. 2019-08-08 15:02:56 +01:00
Geoffrey White
843b85c0e6 CPP: Test PureVirtualFunction. 2019-08-08 15:02:55 +01:00
Geoffrey White
44ea685bf3 CPP: Simplify the VirtualFunctions test. 2019-08-08 15:02:55 +01:00
Jonas Jensen
98d6f3cada C++: Unify partial def and def-by-ref
This removes a lot of flow steps, but it all seems to be flow that was
present twice: both exiting a `PartialDefNode` and a
`DefinitionByReferenceNode`. All `DefinitionByReferenceNode`s are now
`PartialDefNode`s.
2019-08-08 14:05:03 +02:00
Jonas Jensen
6a3f5efc1b C++: Accept AST field flow test output 2019-08-08 14:05:03 +02:00
Pavel Avgustinov
79d75d7d18 Add extra test cases 2019-08-08 14:05:03 +02:00
Pavel Avgustinov
b1632587bc Use more meaningful name 2019-08-08 14:05:03 +02:00
Pavel Avgustinov
6d4d131ad4 C++ field flow: Add test.
This is a fairly direct translation of the Java field flow test to
C++. Not all the `// flow` annotations are currently accurate.
2019-08-08 14:05:03 +02:00
Jonas Jensen
077f372f98 Merge pull request #1570 from geoffw0/qldoceg
CPP: Add syntax examples to QLDoc in Class.qll.
2019-08-06 21:17:45 +02:00
Geoffrey White
bbe7691a3d CPP: Fix indentation. 2019-08-06 17:56:24 +01:00
Geoffrey White
42bf1be0fd CPP: 'if constexpr' test cases. 2019-08-06 17:56:24 +01:00
Geoffrey White
6a5ac08578 CPP: Add c++17 flag to the test. 2019-08-06 17:56:24 +01:00
Geoffrey White
3550fc7137 CPP: Merge the two unions tests. 2019-08-06 16:05:10 +01:00
Geoffrey White
4ed559ee0b CPP: Extend the unions test. 2019-08-06 16:00:35 +01:00
Geoffrey White
cf20647765 CPP: Extend the structs test. 2019-08-06 15:52:25 +01:00
Geoffrey White
2466299df5 CPP: Improve the Enums3 test. 2019-08-06 15:38:10 +01:00
Geoffrey White
064b8773a4 CPP: Test LocalEnum and NestedEnum. 2019-08-06 15:38:10 +01:00
Nick Rolfe
257daddf3b Merge pull request #1702 from mgrettondann/cpp-add-thread_local-support-external
C++: add thread_local support
2019-08-06 14:51:27 +01:00
Jonas Jensen
d378da33e8 C++ IR: Fix performance of large array value init
There were two problems here.

1. The inline predicates `isInitialized` and `isValueInitialized` on
   `ArrayAggregateLiteral` caused their callers to materialize every
   `int` that was a valid index into the array. This was slow on huge
   value-initialized arrays.
2. The `isInitialized` predicate was used in the `TInstructionTag` IPA
   type, creating a numbered tuple for each integer in it. This seemed
   to be entirely unnecessary since the `TranslatedElement`s using those
   tags were already indexed appropriately.
2019-08-06 14:50:57 +02:00
Jonas Jensen
f160447c20 C++: Update test results to latest master 2019-08-06 14:42:47 +02:00
Geoffrey White
0029a33ee6 CPP: Deprecate Interface and remove the test. 2019-08-06 13:29:42 +01:00
Jonas Jensen
d0d6b2b70c C++: Add IR sanity queries to syntax-zoo test dir 2019-08-06 14:10:25 +02:00
Jonas Jensen
d18181f032 C++: Rename qlcfg -> syntax-zoo 2019-08-06 14:10:25 +02:00
Matthew Gretton-Dann
0e50a143af C++: Improve ReturnStackAllocatedMemory query
Update the ReturnStackAllocatedMmeory query to not give a false positive
for thread_local variables.
2019-08-06 11:22:32 +01:00