Jonas Jensen
5e789901df
C++: Remove all uses of hasQualifiedName/1
2019-05-03 10:37:48 +02:00
Jonas Jensen
64a87a863c
C++: Remove uses of getQualifiedName
...
This removes all uses of `Declaration.getQualifiedName` that I think can
be removed without changing any behaviour. The following uses in the
LGTM default suite remain:
* `cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql` (in `select`).
* `cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll` (needs template args).
* `cpp/ql/src/semmle/code/cpp/security/FunctionWithWrappers.qll` (used for alert messages).
2019-05-03 10:37:48 +02:00
Geoffrey White
a5b9df204b
CPP: Autoformat.
2019-05-01 13:59:28 +01:00
Jonas Jensen
9d15e67f3c
C++: Use variableAccessedAsValue in LargeParameter
...
Using `variableAccessedAsValue` fixes a FP because we can now
distinguish modifications to the parameter from modifications to data
_reachable from_ the parameter.
2019-05-01 13:58:55 +01:00
Geoffrey White
2ef3cc30c0
CPP: Fix for functions with no definition.
2019-05-01 13:17:11 +01:00
Geoffrey White
32b6e9bd3c
CPP: Exclude cases where the parameter is written to.
2019-05-01 13:17:10 +01:00
Geoffrey White
88a0e60a2a
CPP: Un-autoformat to ease merge.
2019-05-01 13:16:46 +01:00
Geoffrey White
09ce95575a
CPP: Fix merge.
2019-05-01 09:08:44 +01:00
Geoffrey White
6234b26496
CPP: Make some repairs manually.
2019-04-23 14:45:27 +01:00
Geoffrey White
e395f5215f
CPP: Autoformat 'Critical'.
2019-04-23 14:45:27 +01:00
Geoffrey White
57a4e52b47
CPP: Remove the overlap between these two queries.
2019-04-18 10:33:33 +01:00
Geoffrey White
ca6ba36d87
CPP: Unify and improve the MallocCall classes.
2019-04-18 10:30:18 +01:00
Geoffrey White
8979361255
CPP: Exclude functions containing preprocessor logic.
2019-04-02 14:24:37 +01:00
Geoffrey White
faeb326bf8
CPP: Use newer dataflow for the fix.
2019-03-20 15:47:48 +00:00
Geoffrey White
7d8886e30c
CPP: Fix over-enthusiastic dataflow in allocExprOrIndirect.
2019-03-20 15:40:02 +00:00
Geoffrey White
249f350cc8
Fix NewDelete.qll performance.
2019-03-12 11:32:24 +00:00
Geoffrey White
56fe91d774
CPP: cached -> pragma[nomagic].
2019-03-05 08:59:16 +00:00
Geoffrey White
a9ce2f7a62
CPP: Simplify out some old optimizations (that make little difference now).
2019-03-04 13:13:04 +00:00
Geoffrey White
df73bb3468
CPP: Fix performance issue. Also has a small positive effect on correctness.
2019-03-04 12:47:55 +00:00
Jonas Jensen
1bc967c1d1
Merge pull request #819 from geoffw0/newdelete
...
CPP: Improve dataflow in newdelete.qll
2019-02-21 15:09:49 +01:00
Geoffrey White
cd13e5877f
CPP: Performance improvement.
2019-02-21 11:31:44 +00:00
Geoffrey White
d30bcb6fcf
CPP: Widen allocReachedVariable slightly.
2019-02-20 10:19:57 +00:00
Geoffrey White
8b2405b267
CPP: Update severity/precision of LargeParameter.ql.
2019-02-08 15:23:57 +00:00
Patrik Schönfeldt
ac249cdbbe
Fix reccomendation for LargeParameter (C++)
...
The previous reccomentation changed the behaviour of the code.
A user following the advice might have broken her/his code:
With call-by-value, the original parameter is not changed.
With a call-by-reference, however, it may be changed. To be sure,
nothing breaks by blindly following the advice, suggest to pass a
const reference.
2019-02-03 15:44:13 +01:00
Jonas Jensen
08db4cd959
Merge pull request #744 from geoffw0/format
...
CPP: Autoformat some untidy files
2019-01-14 21:31:17 +01:00
Jonas Jensen
1cc36dd969
C++: Exclude copy assignment in LargeParameter.ql
...
The purpose of the copy assignment operator is to copy the object, so we
should not complain that a copy happens when passing the parameter. See
https://en.wikibooks.org/wiki/More_C++_Idioms/Copy-and-swap for details.
2019-01-11 12:00:02 +01:00
Geoffrey White
87569d14b9
CPP: QLDoc comments.
2019-01-10 17:38:42 +00:00
Geoffrey White
ba3bc1596b
CPP: Manual fixup.
2019-01-10 15:28:13 +00:00
Geoffrey White
346bc1ac62
CPP: Autoformat some code from Critical.
2019-01-10 10:40:39 +00:00
Aditya Sharad
c20b688a3f
Merge master into next.
2018-11-23 16:36:31 +00:00
Geoffrey White
cb609f4be0
CPP: Be conservative where there are multiple flow sources.
2018-11-22 15:50:13 +00:00
Geoffrey White
d57574e92c
CPP: localFlowStep* -> localFlow.
2018-11-22 15:50:13 +00:00
Geoffrey White
ea56a5d9ce
CPP: Add local dataflow to (one bit of) OverflowStatic.ql.
2018-11-22 15:49:13 +00:00
Pavel Avgustinov
16ec9f1aa4
Merge remote-tracking branch 'origin/next' into bump/master-next
2018-11-19 10:37:07 +00:00
Felicity Chapman
5c924307ca
Remove incorrect comment from query
2018-11-17 13:03:46 +00:00
Geoffrey White
0d7c5eaa6e
Merge pull request #441 from felicity-semmle/cpp/SD-2777-cwe-qhelp
...
C++: Bring qhelp inline with current guidelines, part 1 (SD-2777)
2018-11-15 11:38:23 +00:00
Felicity Chapman
1776ebd991
Fix typo in code tag
2018-11-15 08:14:08 +00:00
Felicity Chapman
fbf5a052ed
Remove stray </p> tag
2018-11-15 07:09:11 +00:00
Felicity Chapman
6312f31f59
Remove the duplicate overview tag
2018-11-14 22:08:59 +00:00
Felicity Chapman
c6af79979c
Update for feedback
2018-11-13 16:50:00 +00:00
Felicity Chapman
2e8f51a545
Update to bring into line with current guidelines
2018-11-12 15:30:19 +00:00
Felicity Chapman
978fc4928f
Fix syntax errors in qhelp files
2018-11-12 10:55:13 +00:00
Felicity Chapman
72ac2e5498
Fix typos
2018-11-12 09:52:00 +00:00
Jonas Jensen
e9dac22cfd
Merge pull request #446 from geoffw0/minor-corrections
...
CPP: Minor corrections to examples
2018-11-12 09:30:39 +01:00
Geoffrey White
e645166fee
CPP: Make InconsistentNullnessTest.cpp example plausible.
2018-11-09 11:41:02 +00:00
Geoffrey White
d5c6f4fd64
CPP: Correct typo in OverflowCalculated.cpp example.
2018-11-09 11:38:33 +00:00
Felicity Chapman
3d779ddebb
Bring qhelp inline with current guidelines
2018-11-08 18:37:41 +00:00
Dave Bartolomeo
5bf88f0f0a
C++: Fix mixed tabs and spaces in non-test code
2018-11-07 11:32:17 -08: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
Robert Marsh
7bcc4379fc
C++: accept loops with arbitrary labels or cases
2018-10-22 09:59:49 -07:00