Commit Graph

140 Commits

Author SHA1 Message Date
Geoffrey White
8aeaf0bc8e CPP: Add an external/jsf tag as well. 2018-11-20 17:13:23 +00:00
Geoffrey White
bb7da78c95 CPP: Tag the JSF queries. 2018-11-20 17:13:22 +00:00
Geoffrey White
0493b68b50 Merge pull request #497 from jbj/disable-no-virtual-destructor
C++: Remove @precision from AV Rule 78
2018-11-20 16:44:36 +00:00
Jonas Jensen
6c0305cb80 Merge pull request #495 from geoffw0/returnvalue
CPP: Fix 'Missing return statement'
2018-11-20 10:16:30 +01:00
Jonas Jensen
d7c2f9d185 C++: Remove @precision from AV Rule 78
This rule, named "No virtual destructor", was supposed to be superseded
by `cpp/virtual-destructor` in 0c796de83, but that commit didn't
actually disable this rule, so both rules are now active in the LGTM
suite.

This commit disables the rule by removing `@precision`. We're still
discussing the best way to disable rules that are precise and valid but
not universally applicable. For now, removing `@precision` is consistent
with how we're keeping most other JSF queries from appearing on LGTM.
2018-11-20 09:43:54 +01:00
Geoffrey White
5cae65295d CPP: Fix FPs from AV Rule 114.ql. 2018-11-19 16:09:40 +00:00
Jonas Jensen
6d17642240 Merge pull request #476 from geoffw0/av_165
CPP: Fix AV Rule 165
2018-11-19 14:32:02 +01:00
Jonas Jensen
2ce2c0a876 Merge pull request #475 from geoffw0/av_164
CPP: Fix AV Rule 164
2018-11-19 14:23:36 +01:00
Pavel Avgustinov
16ec9f1aa4 Merge remote-tracking branch 'origin/next' into bump/master-next 2018-11-19 10:37:07 +00:00
Felicity Chapman
d4bcc1e9d4 Add note to further file 2018-11-17 13:03:48 +00:00
Felicity Chapman
9ce1a2a040 Add JSF note to qhelp for sub-set of JSF queries 2018-11-17 13:03:45 +00:00
Geoffrey White
d1adc0e3ec CPP: Fix for explicitly cast expressions. 2018-11-14 19:43:24 +00:00
Geoffrey White
3f428a8876 CPP: Fix for explicitly cast expressions. 2018-11-14 19:11:56 +00:00
Felicity Chapman
2e8f51a545 Update to bring into line with current guidelines 2018-11-12 15:30:19 +00: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
Dave Bartolomeo
5bf88f0f0a C++: Fix mixed tabs and spaces in non-test code 2018-11-07 11:32:17 -08: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
Jonas Jensen
da73a033e5 C++: Restore exists(getBlock()) in AV Rule 82
I removed this condition in #362, thinking it was covered by the new
conditions on return statements, but it turns out it wasn't in at least
the following cases.

1. Assignment operators that are deleted or marked private in order to
   make them inaccessible.
2. Templates whose body was not extracted.

While some of these results are technically valid, they are not nearly
as interesting as the results that this query was designed to produce.
2018-11-06 13:42:20 +01: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
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
1a6229621c CPP: Tidy up query formatting a little. 2018-10-30 14:25:37 +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
Ian Lynagh
94347aef9b C++: AV Rule 85: Check templates rather than instantiations 2018-10-29 15:04:30 +00: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
3c6bed4de6 C++: FP fix for "operator= doesn't return *this" 2018-10-24 15:44:00 +02:00
Jonas Jensen
7affbe4a7d Merge pull request #341 from geoffw0/av_114
CPP: Improve AV Rule 114.ql's understanding of return types.
2018-10-24 09:39:51 +02:00
Jonas Jensen
640de0c947 Merge pull request #304 from geoffw0/resource-released
CPP: Fix false positive in AV Rule 79.ql
2018-10-23 20:24:23 +02:00
Geoffrey White
dda7069890 CPP: Look for destructors in the template. 2018-10-23 13:05:43 +01:00
Geoffrey White
905336a625 CPP: Refine fix. 2018-10-23 13:05:42 +01:00
Geoffrey White
b861df0887 CPP: Fix issue when destructor body is missing. 2018-10-23 13:05:42 +01:00
Geoffrey White
5158984613 CPP: Fix the issue. 2018-10-19 22:51:35 +01:00
Geoffrey White
9d5e674fc5 CPP: Fix hasXMacro performance. 2018-10-11 16:42:36 +01:00
Jonas Jensen
9c0ba51873 C++: Make cpp/missing-return visible on LGTM again 2018-10-03 15:02:15 +02:00
Dave Bartolomeo
aa267c8302 C++: Force LF for .c,.cpp,.h,.hpp 2018-09-23 16:23:52 -07:00
Geoffrey White
3922082e7d CPP: Tidy and simplify AV Rule 79.ql. 2018-09-21 19:35:23 +01:00
Geoffrey White
84f9900c8c CPP: Exclude placement new. 2018-09-21 10:53:42 +01:00
Ian Lynagh
a1e44041ec C++: Use mkElement/unresolveElement consistently 2018-08-20 16:12:26 +01:00
Ian Lynagh
d2b4265b73 C++: Improve the JSF 3.02 rule 1 message, and add a test 2018-08-15 15:26:18 +01:00
Pavel Avgustinov
b55526aa58 QL code and tests for C#/C++/JavaScript. 2018-08-02 17:53:23 +01:00