Geoffrey White
2d07410f97
CPP: Exclude variables that are part of an interface.
2018-11-16 22:46:11 +00:00
Geoffrey White
b70c572e34
CPP: Add a test for LimitedScopeFunction.
2018-11-16 22:44:41 +00:00
Geoffrey White
e253ab54d7
CPP: Exclude variables that are part of an interface.
2018-11-16 22:38:16 +00:00
Geoffrey White
0e5d23e78b
CPP: Add a test of LimitedScopeFile.
2018-11-16 22:37:30 +00:00
Geoffrey White
d1adc0e3ec
CPP: Fix for explicitly cast expressions.
2018-11-14 19:43:24 +00:00
Geoffrey White
3028e85457
CPP: Add a test of AV Rule 164.
2018-11-14 19:40:29 +00:00
Geoffrey White
3f428a8876
CPP: Fix for explicitly cast expressions.
2018-11-14 19:11:56 +00:00
Geoffrey White
5cddabb1fd
CPP: Add a test of AV Rule 165.
2018-11-14 19:05:35 +00:00
Aditya Sharad
f0715b09e1
Merge master into next.
2018-11-14 10:06:27 +00:00
Geoffrey White
1d464ae35d
CPP: Merge the ExprHasNoEffect tests.
2018-11-12 16:26:50 +00:00
Geoffrey White
1417929cdf
CPP: Merge the Todo/FixmeComments tests.
2018-11-12 16:26:50 +00:00
Geoffrey White
03cad6c084
CPP: Move the AV Rule 97 test.
2018-11-12 16:07:03 +00:00
Geoffrey White
2d665e51d0
CPP: Move the BitwiseSignCheck.ql test.
2018-11-12 16:07:03 +00:00
Jonas Jensen
1500237009
Merge remote-tracking branch 'upstream/master' into mergeback-20181112
2018-11-12 13:24:27 +01:00
Jonas Jensen
0caf0f1f15
Merge pull request #430 from geoffw0/exprtemplate
...
CPP: Exclude template code from ExprHasNoEffect.ql
2018-11-12 09:27:36 +01:00
Aditya Sharad
761e5efd60
Merge master into next.
...
JavaScript semantic conflicts fixed by referring to the `LegacyLanguage` enum.
C++ conflicts fixed by accepting Qltest output.
2018-11-09 18:49:35 +00:00
Geoffrey White
0e9c7fc085
Merge pull request #416 from raulgarciamsft/users/raulga/c6317
...
cpp: Incorrect not operator usage
2018-11-09 15:59:57 +00:00
Geoffrey White
5b09e11a52
CPP: Repair macro case.
2018-11-08 10:01:07 +00:00
Geoffrey White
d6f27f0b2d
CPP: Add a test of macros.
2018-11-08 09:58:59 +00:00
Raul Garcia
f9edaba5aa
Fixing typo.
...
Restricting to analyze only logical & and | operations
2018-11-07 13:26:09 -08:00
Geoffrey White
7bf9200a18
CPP: Fix (it looks like we already had a similar test, both are fixed.
2018-11-07 14:12:52 +00:00
Geoffrey White
73b186a695
CPP: Add test case.
2018-11-07 13:34:42 +00:00
Jonas Jensen
6f2fd05480
Merge pull request #354 from geoffw0/return-exception
...
CPP: Remove successor edges after calls to non-returning functions
2018-11-07 09:24:41 +01:00
Raul Garcia
5a35edfbe2
cpp: Incorrect not opeartor usage
...
Marked as Low precision as Linux kernel code mix the usage of logical operators and bit-wise opeartors.
warning C6317: incorrect operator: logical-not (!) is not interchangeable with ones-complement (~)
2018-11-06 12:49:33 -08:00
Dave Bartolomeo
62a5aef0de
Merge pull request #410 from jbj/range-analysis-tests
...
C++: Tests for two range analysis bugs
2018-11-06 10:51:12 -08:00
Geoffrey White
9c97176896
CPP: Tabs/spaces.
2018-11-06 17:01:30 +00:00
Jonas Jensen
9382c9d528
C++: Regression tests for AV Rule 82
...
Without the last commit, this addition to the test gives the following
results:
```
+| AV Rule 82.cpp:176:14:176:22 | operator= | Assignment operator in class Forgivable does not return a reference to *this. |
+| AV Rule 82.cpp:181:14:181:22 | operator= | Assignment operator in class Forgivable does not return a reference to *this. |
```
2018-11-06 16:13:44 +01:00
Jonas Jensen
4a02b3946d
C++: Tests for two range analysis bugs
2018-11-06 11:57:41 +01:00
Dave Bartolomeo
3133bf6675
C++: Fix test expectation
2018-11-05 14:19:59 -08:00
Dave Bartolomeo
0c796de831
C++: Fork AV Rule 78 into NonVirtualDestructorInBaseClass
...
AV Rule 78 has proved too noisy for use on lgtm.com. However, if we make the rule less noisy by, say, allowing a protected destructor to be non-virtual, we're no longer actually enforcing AV Rule 78. Instead, I've copied AV Rule 78 into NonVirtualDestructorInBaseClass.ql, given the new query the `@id` that AV Rule 78 had, and given AV Rule 78 a new JSF-specific `@id`. The new rule allows non-public non-virtual destructors, which is the problem originally reported by an lgtm.com user.
2018-11-05 14:16:35 -08:00
Geoffrey White
3cb4211c78
CPP: Exclude code in macro invocations.
2018-11-05 15:07:22 +00:00
Geoffrey White
b4adfec2ef
CPP: Add test case.
2018-11-05 14:19:16 +00:00
Aditya Sharad
b896899f4c
Merge master into next.
...
master as of dc3c5a684c
Version numbers resolved in favour of `next`.
C++ expected output file updated to accept test output.
2018-10-31 10:47:31 +00:00
Geoffrey White
6427e9658b
CPP: Remove successor edges from non-returning functions from the control flow graph.
2018-10-30 14:25:32 +00:00
Geoffrey White
44f5e26fb0
CPP: More test cases.
2018-10-30 14:20:48 +00:00
Geoffrey White
a346f412bc
CPP: Add test cases.
2018-10-30 14:11:36 +00:00
Jonas Jensen
3340e79aad
Merge pull request #371 from ian-semmle/av85
...
C++: Fix AV Rule 85
2018-10-30 08:40:43 +01:00
Robert Marsh
fda75abcd7
Merge pull request #381 from geoffw0/comments
...
CPP: Fix false positive in EmptyBlock.ql
2018-10-29 15:35:08 -07:00
semmle-qlci
a4371ca824
Merge pull request #338 from geoffw0/hresult
...
Approved by dave-bartolomeo
2018-10-29 17:04:54 +00:00
Geoffrey White
3ccbeb0c65
CPP: Fix issue.
2018-10-29 16:34:57 +00:00
Geoffrey White
630233fc3e
CPP: Additional test cases.
2018-10-29 16:34:43 +00:00
Ian Lynagh
94347aef9b
C++: AV Rule 85: Check templates rather than instantiations
2018-10-29 15:04:30 +00:00
semmle-qlci
7d37cf4bb3
Merge pull request #374 from jbj/range-analysis-rounding
...
Approved by kevinbackhouse
2018-10-29 10:28:15 +00:00
Jonas Jensen
006594fefe
C++: Round towards +/- Inf in range analysis
...
Original author: Kevin Backhouse
2018-10-26 11:53:51 +02:00
Geoffrey White
fa55e31f7a
Merge pull request #362 from jbj/return-this-noreturn
...
C++: Fix "Overloaded assignment does not return 'this'" for non-returning functions
2018-10-26 09:30:36 +01:00
Aditya Sharad
56ee5ff99a
Merge master into next.
...
`master` up to and including cfe0b8803a .
2018-10-25 15:32:47 +01:00
Jonas Jensen
354f8bd0ff
C++: Test of range analysis 64-bit rounding issue
2018-10-25 16:18:22 +02:00
Ian Lynagh
eef8719a40
C++: Fix AV Rule 85
...
We have to be careful to avoid giving alerts to functions that might be
correctly defined, but we can't see the definition as it wasn't
instantiated.
2018-10-25 14:26:31 +01:00
Jonas Jensen
5cbfdd1029
C++: Cover more cases of returning *this
2018-10-25 10:41:56 +02:00
Jonas Jensen
d144f0d154
C++: Test for unreachable return statement
...
This test shows that the previous fix did not solve the problem where a
bad return statement exists but is unreachable.
2018-10-25 09:42:15 +02:00