Tom Hvitved
40def8d364
Merge pull request #418 from dave-bartolomeo/dave/FormatConfig
...
Allow mixed whitespace in certain test and external directories
2018-11-12 09:43:39 +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
Geoffrey White
09782d145e
CPP: Annotate expr_has_no_effect test.
2018-11-09 17:23:59 +00:00
Geoffrey White
3f0e28aea9
CPP: Fix additional expr_has_no_effect test.
2018-11-09 17:23:59 +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
Dave Bartolomeo
a141f4c81a
Allow mixed whitespace in C#, C++, and Java test sources
2018-11-08 11:06:42 -08: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
Dave Bartolomeo
5bf88f0f0a
C++: Fix mixed tabs and spaces in non-test code
2018-11-07 11:32:17 -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
a3dfa3140c
CPP: Make Handlers always begin a BasicBlock.
2018-11-01 15:27:43 +00:00
Jonas Jensen
ea601b2dc0
Merge pull request #352 from dave-bartolomeo/dave/Operands
...
C++: Operands as IPA types
2018-11-01 10:12:38 +01:00
Geoffrey White
1092cb97e5
CPP: Have reachability flow to the Handler as well as the CAtchBlock of an exception.
2018-10-30 14:27:22 +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
f2ba627291
CPP: Extend the c++_exceptions test.
2018-10-30 14:11:48 +00:00
Geoffrey White
a346f412bc
CPP: Add test cases.
2018-10-30 14:11:36 +00: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
semmle-qlci
7d37cf4bb3
Merge pull request #374 from jbj/range-analysis-rounding
...
Approved by kevinbackhouse
2018-10-29 10:28:15 +00:00
Geoffrey White
35a5bca98a
Merge pull request #376 from ian-semmle/functionName
...
C++: Simplify a test's query
2018-10-26 17:24:11 +01:00
Ian Lynagh
09959cbbfc
C++: Simplify a test's query
...
This test predated Function.getFullSignature()
2018-10-26 15:08:18 +01:00
Jonas Jensen
a3505e008b
C++: Fix range analysis rounding for negative zero
2018-10-26 13:40:17 +02: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
Jonas Jensen
354f8bd0ff
C++: Test of range analysis 64-bit rounding issue
2018-10-25 16:18:22 +02: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
semmle-qlci
cfe0b8803a
Merge pull request #332 from raulgarciamsft/users/raulga/c6293a
...
Approved by dave-bartolomeo
2018-10-25 00:59:35 +01:00
Jonas Jensen
3c6bed4de6
C++: FP fix for "operator= doesn't return *this"
2018-10-24 15:44:00 +02:00
Jonas Jensen
47a548f564
C++: FP test for "operator= doesn't return *this"
...
This rule should not apply to functions that never return.
2018-10-24 15:42:39 +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
Dave Bartolomeo
f278f4fa47
C++: Operands as IPA types
...
@rdmarsh2 has been working on various queries and libraries on top of the IR, and has pointed out that having to always refer to an operand of an instruction by the pair of (instruction, operandTag) makes using the IR a bit clunky. This PR adds a new `Operand` IPA type that represents an operand of an instruction. `OperandTag` still exists, but is now an internal type used only in the IR implementation.
2018-10-23 14:58:44 -07: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
semmledocs-ac
1f390f2f77
Merge pull request #326 from rdmarsh2/rdmarsh/cpp/dead-code-goto
...
C++: new query for dead code after goto or break
2018-10-23 16:55:14 +01:00
Geoffrey White
dda7069890
CPP: Look for destructors in the template.
2018-10-23 13:05:43 +01:00
Geoffrey White
76a5072c8b
CPP: Change in results presumed to result from discover_walk extractor changes.
2018-10-23 13:05:43 +01:00
Geoffrey White
b861df0887
CPP: Fix issue when destructor body is missing.
2018-10-23 13:05:42 +01:00