Jonas Jensen
f5b9837e19
C++: Use StackVariable in Nullness.qll
...
This might cause fewer variables to be analysed because not every use of
`LocalScopeVariable` was constrained by the def-use library. Hopefully
this leads to an improved nullness analysis since it avoids treating
`static T *x = nullptr;` the same as `static T *x; x = nullptr;`.
2019-11-19 11:31:34 +01:00
Jonas Jensen
140575ee71
C++: Use StackVariable where SSA/def-use are used
...
These changes should not affect semantics since these uses of
`LocalScopeVariable` were already constrained to stack variables by
their use of SSA or def-use.
2019-11-19 11:31:34 +01:00
Jonas Jensen
6f9ec0409e
C++: Use StackVariable in code that uses RangeSSA
2019-11-19 11:31:33 +01:00
Jonas Jensen
29f66ff095
C++: Use StackVariable, remove not v.isStatic()
...
In these files it was possible to remove calls to `isStatic` by
switching from `LocalScopeVariable` to `StackVariable`. This changes
semantics, hopefully for the better, to treat `thread_local` locals the
same as `static` locals.
2019-11-19 11:30:59 +01:00
Jonas Jensen
e57f98ca64
C++: Use StackVariable in def-use libraries
...
Most of the implementation was already in terms of
`SemanticStackVariable`, so not much should have changed.
2019-11-19 11:30:59 +01:00
Jonas Jensen
95a333d28c
C++: Use StackVariable in SSA libraries
...
This means we'll no longer get SSA definitions for thread-local
local-scope variables.
2019-11-19 11:30:59 +01:00
Jonas Jensen
c1ed908834
C++: Use StackVariableReachability
...
This library is a drop-in replacement for
`LocalScopeVariableReachability`, so no changes are expected.
2019-11-19 11:30:59 +01:00
Jonas Jensen
01ca63ae92
C++: Bring back StackVariableReachability.qll
...
This is now a copy of `LocalScopeVariableReachability.qll`, just with
`s/LocalScopeVariable/StackVariable/g`. It can be used as a drop-in
replacement since the `LocalScopeVariableReachability.qll` library
implementation was already restricted to `SemanticStackVariable`.
2019-11-19 11:30:59 +01:00
Jonas Jensen
8110039e0a
C++: Bring back the StackVariable QL class
...
The new `StackVariable` class actually denotes what its name suggests.
2019-11-19 11:23:34 +01:00
yh-semmle
de65f023d6
Merge pull request #2167 from aschackmull/java/dataflow-out-of-arg-refactor
...
Java/C++/C#: Refactor dataflow to simplify return flow.
2019-11-15 11:10:06 -05: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
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
f2b7af7437
CPP: Add example code for RoutineType.
2019-11-14 15:25:00 +00:00
Geoffrey White
dc34fa366c
CPP: Add a test of RoutineType.
2019-11-14 15:13:52 +00:00
Nick Rolfe
f5513342d6
C++: add missing backtick in qldoc comment
2019-11-14 13:20:41 +00:00
Geoffrey White
beb3602253
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:49:02 +00:00
Geoffrey White
6724632413
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:48:50 +00:00
Geoffrey White
45cc6c445c
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:48:05 +00:00
Geoffrey White
0bb37c17f2
CPP: Delete parenthesized comment.
2019-11-14 12:46:43 +00:00
Geoffrey White
8b30baf656
CPP: Delete 'compiler-generated'.
2019-11-14 12:43:54 +00:00
Geoffrey White
f96cffa1f3
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:41:10 +00:00
Geoffrey White
82c6ff02b2
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:40:53 +00:00
Geoffrey White
6262cee27d
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:40:41 +00:00
Geoffrey White
fe5bd42203
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:40:29 +00:00
Geoffrey White
d8aeedfe01
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:40:11 +00:00
Geoffrey White
877e9ba6d8
Update cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:39:54 +00:00
Geoffrey White
acefadda8c
Update cpp/ql/src/semmle/code/cpp/exprs/Assignment.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:35:15 +00:00
Geoffrey White
b1dfc60422
Update cpp/ql/src/semmle/code/cpp/exprs/Cast.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 12:34:13 +00:00
Anders Schack-Mulligen
106b8cfbca
Java/C++/C#: Fix bad magic and bad join-order.
2019-11-14 13:17:17 +01:00
Jonas Jensen
c7176e50ca
C++: Tweak wording in docs
2019-11-14 13:03:34 +01:00
Geoffrey White
79a000d88f
Update cpp/ql/src/semmle/code/cpp/exprs/Expr.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:31:27 +00:00
Geoffrey White
0f2a2cb956
Update cpp/ql/src/semmle/code/cpp/exprs/Expr.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:31:01 +00:00
Geoffrey White
25db90021b
Update cpp/ql/src/semmle/code/cpp/exprs/Expr.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:29:03 +00:00
Geoffrey White
01b25199d0
CPP: Lesser than -> Less than.
2019-11-14 11:27:15 +00:00
Geoffrey White
238918c394
Update cpp/ql/src/semmle/code/cpp/Type.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:24:54 +00:00
Geoffrey White
b3bda421bc
Update cpp/ql/src/semmle/code/cpp/Type.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:24:15 +00:00
Geoffrey White
90909d211c
Update cpp/ql/src/semmle/code/cpp/Type.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:24:00 +00:00
Geoffrey White
7d2babd9db
Update cpp/ql/src/semmle/code/cpp/Type.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:22:16 +00:00
Geoffrey White
97559857bf
Update cpp/ql/src/semmle/code/cpp/Type.qll
...
Co-Authored-By: Jonas Jensen <jbj@github.com >
2019-11-14 11:22:07 +00:00
Jonas Jensen
931b0f1445
Apply suggestions from code review
...
Co-Authored-By: Alistair <54933897+hubwriter@users.noreply.github.com >
2019-11-14 12:06:02 +01: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
Dave Bartolomeo
55010d030d
Merge pull request #2315 from geoffw0/errtest
...
CPP: Add a quick test of ErroneousType.
2019-11-13 13:24:39 -07:00
Dave Bartolomeo
e89ecc19e3
Merge pull request #2302 from max-schaefer/test-qlpacks
...
Add `qlpack.yml` files for test folders.
2019-11-13 12:21:19 -07:00
Geoffrey White
32b5501177
CPP: Add a test of ErroneousType.
2019-11-13 18:53:43 +00:00
Geoffrey White
44ffb600d6
CPP: Improve the UnknwonType example as suggested.
2019-11-13 16:55:32 +00:00
Geoffrey White
2b73af09e4
CPP: Consistency.
2019-11-13 16:39:51 +00:00
Geoffrey White
e72bf2d35e
CPP: *lvalue* -> _lvalue_ and similar.
2019-11-13 16:36:18 +00:00
Geoffrey White
e883220de3
CPP: Remove other comments about equivalence.
2019-11-13 16:28:50 +00:00
Jonas Jensen
81d06e2ce6
C++: Update annotation in test file
2019-11-13 16:58:25 +01:00