Commit Graph

122 Commits

Author SHA1 Message Date
Jeroen Ketema
06f6bac169 C++: Silence alerts coming from CMake test compilation files 2025-01-07 14:12:55 +01:00
Jeroen Ketema
b7d1da8741 C++: Introduce a new base class for template parameters
This will enable us to support non-type template parameters, which we
currently do not support, and error template parameters, which might
become relevant in the `build-mode: none` context.
2024-12-17 20:25:41 +01:00
Mathias Vorreiter Pedersen
6fd9e19673 C++: Fix a join-order problem that happens on #18207. 2024-12-04 20:10:45 +00:00
Jeroen Ketema
6d37efc0d8 Update cpp/ql/src/Best Practices/GuardedFree.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2024-11-28 16:36:13 +01:00
Jeroen Ketema
f9d9f9ba62 Update cpp/ql/src/Best Practices/GuardedFree.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2024-11-28 16:36:04 +01:00
Jeroen Ketema
088a3ef15c Update cpp/ql/src/Best Practices/GuardedFree.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
2024-11-28 16:35:39 +01:00
Jeroen Ketema
6aa7c93af2 C++: More qlhelp fixes 2024-11-26 13:58:54 +01:00
Jeroen Ketema
e1f70a0dec C++: Add missing </p> to qlhelp 2024-11-26 13:50:09 +01:00
Jeroen Ketema
d9b278de66 C++: Promote cpp/guarded-free 2024-11-26 11:45:55 +01:00
Calum Grant
cd1f10cdea C++: Reinstate accidentally-deleted comment 2024-10-01 16:15:24 +01:00
Calum Grant
59a77d70c0 C++: Use Function::hasErrors in queries 2024-10-01 11:01:23 +01:00
Tony Torralba
3fcc99e5cb C++: Remove omittable exists variables 2023-01-10 13:36:01 +01:00
Geoffrey White
1d4631e231 C++: Better solution. 2022-12-07 18:00:38 +00:00
Geoffrey White
627162b343 C++: Fix cpp/offset-use-before-range-check performance. 2022-12-07 17:32:36 +00:00
Geoffrey White
257748d82b C++: Rename predicate. 2022-10-25 14:52:22 +01:00
Geoffrey White
6f77e14aef C++: Fix rare performance issue on cpp/comma-before-misleading-indentation. 2022-10-24 18:21:10 +01:00
Geoffrey White
73f977c98c Merge pull request #10510 from geoffw0/staticfn
C++: Fix FPs for cpp/unused-static-function in files that were not extracted completely
2022-10-18 14:53:49 +01:00
Nora Dimitrijević
949d3e13fe Merge branch 'main' into cpp/comma-before-misleading-indentation 2022-10-12 13:25:22 +02:00
Nora Dimitrijević
695d8c6004 C++: Add Wikipedia references to QHelp 2022-10-12 13:21:24 +02:00
Nora Dimitrijević
93c01371c3 C++: no parens in select message
Debatable; see comment thread in PR.
2022-10-12 13:01:37 +02:00
Nora Dimitrijević
b42b88338e C++: s/put/but/ typo in QHelp 2022-10-12 13:00:42 +02:00
Nora Dimitrijević
a56770999f Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2022-10-12 12:54:27 +02:00
Josh Soref
f06c15b86a spelling: genuinely
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-11 00:23:36 -04:00
erik-krogh
66c9705502 fix some more style-guide violations in the alert-messages 2022-10-07 11:19:46 +02:00
Nora Dimitrijević
d8cfdc5e26 C++: Tag with CWE-1078, CWE-670 2022-10-05 00:04:56 +02:00
Nora Dimitrijević
28606c561d C++: Simplify normalizeExpr
This has a comparable but different set of FPs as the previous version.
But arguably it's an improvement.
2022-09-30 14:35:54 +02:00
Nora Dimitrijević
9a94222dbe C++: Exclude commas from SwitchStmt.getExpr() 2022-09-30 12:32:03 +02:00
Nora Dimitrijević
4938de9185 C++: Fix docstring per suggestion
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
2022-09-30 12:28:18 +02:00
Nora Dimitrijević
c37c6a004e Merge branch 'main' into cpp/comma-before-misleading-indentation 2022-09-30 00:28:33 +02:00
Nora Dimitrijević
a124dcf436 C++: Update QLDoc
Arguably warning, not just recommendation; it may be a logic error.

TODO: What CWE/CVEs should I tag this with?
2022-09-30 00:06:53 +02:00
Nora Dimitrijević
981a9798b8 C++: Update .qhelp with precision disclaimer. 2022-09-29 23:59:22 +02:00
Nora Dimitrijević
68b473377a C++: Fix QL-on-QL Redundant Cast warning 2022-09-29 23:19:49 +02:00
Nora Dimitrijević
2a046352ce C++: Simplify 2022-09-29 23:06:17 +02:00
Nora Dimitrijević
891bc342be C++: Fix another implicit/explicit this FP 2022-09-29 18:42:23 +02:00
Nora Dimitrijević
28bd591107 C++: Fix explicit this-> FP. 2022-09-29 17:04:11 +02:00
Nora Dimitrijević
29d7c0e21b C++: Exclude commas in if-conditions. 2022-09-29 16:29:57 +02:00
Nora Dimitrijević
64903336f7 C++: Exclude all parenthesized CommaExprs. 2022-09-29 15:49:29 +02:00
Nora Dimitrijević
909b36a078 C++: Fix implicit-this FP, uncovered non-funptr FP 2022-09-29 13:14:36 +02:00
Nora Dimitrijević
96c73bcb19 C++: Fix FP: bad Location for FieldAccess exprs 2022-09-28 20:37:22 +02:00
Nora Dimitrijević
6d5df14547 C++: Remove arguable FPs re: sizeof/decltype 2022-09-28 20:01:14 +02:00
Nora Dimitrijević
592bc18a97 C++: Reduce FPs by excluding all commas in loop heads
This leads to a 50% reduction of alerts in MRVA 1000.
2022-09-28 19:38:41 +02:00
Nora Dimitrijević
0128b1702e C++: Fix "LHS-end = RHS-begin" FP 2022-09-28 15:36:01 +02:00
Nora Dimitrijević
e7c1fadd94 C++: Fix member-call- and C-cast-related FPs 2022-09-28 15:02:22 +02:00
erik-krogh
0f1a8a6f5b deleted unused internal code 2022-09-26 20:20:52 +02:00
erik-krogh
a30c38f38c CPP: make more alert messages follow the style-guide 2022-09-23 14:45:59 +02:00
Geoffrey White
d60a829569 C++: Remove ErrorExpr case. 2022-09-23 12:17:09 +01:00
Nora Dimitrijević
0e9b77e7c3 C++: Initial .qhelp file 2022-09-23 11:46:31 +02:00
Nora Dimitrijević
dca13f5c89 C++: Initial cpp/comma-before-misleading-indentation
MRVA top 1000 run at: https://github.com/github/semmle-code/actions/runs/3106828111
2022-09-22 17:44:18 +02:00
Nora Dimitrijević
f1efc76e8c C++: Initial commit of cpp/comma-before-missing-indentation 2022-09-22 17:06:04 +02:00
Geoffrey White
0584191b6c C++: Add pragma[noinline]. 2022-09-21 11:49:28 +01:00