Commit Graph

2424 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
116664588b Merge pull request #16125 from MathiasVP/destructors-for-unconditional-unnamed
C++: Generate IR for destruction of unconditionally constructed temporaries
2024-04-12 16:26:03 +01:00
Anders Schack-Mulligen
f202661912 C++: Add alert provenance plumbing. 2024-04-12 09:20:06 +02:00
Anders Schack-Mulligen
eafc0075fd Legacy dataflow: Sync. 2024-04-12 09:19:54 +02:00
Mathias Vorreiter Pedersen
7172e2f445 Merge branch 'main' into destructors-for-unconditional-unnamed 2024-04-10 17:34:08 +01:00
Mathias Vorreiter Pedersen
33f6b6a940 Merge pull request #16175 from MathiasVP/more-iterator-models
C++: Add alias and side-effect models for more iterator functions
2024-04-10 16:55:10 +01:00
Jeroen Ketema
b9b2aa3580 Merge pull request #16138 from jketema/coroutine3
C++: Update expected test results
2024-04-10 17:48:48 +02:00
Mathias Vorreiter Pedersen
0ed0731024 C++: Reduce comment duplication. 2024-04-10 15:04:29 +01:00
Mathias Vorreiter Pedersen
9c9ed13ede C++: More comments. 2024-04-10 14:57:40 +01:00
Mathias Vorreiter Pedersen
1ae22d0781 C++: Improve comment based on PR feedback. 2024-04-10 14:55:29 +01:00
Mathias Vorreiter Pedersen
d98ed2d3cf C++: Add alias and side effect models for more iterator functions. 2024-04-10 14:19:06 +01:00
Mathias Vorreiter Pedersen
a53ef495ee C++: Simplify 'hasExactBufferType' and add comments. 2024-04-09 16:04:20 +01:00
Mathias Vorreiter Pedersen
291cc0a671 C++: Anonymous namespaces provide internal linkage. 2024-04-09 15:25:13 +01:00
Mathias Vorreiter Pedersen
2a7420ce11 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TypeFlow.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-04-09 15:00:23 +01:00
Jeroen Ketema
46c44b4dc0 C++: Update QLDoc of IRDeclarationEntry to reflect current reality 2024-04-09 15:15:41 +02:00
Mathias Vorreiter Pedersen
c325a79206 C++: Ensure 'isConditionalTemporaryDestructorCall' only holds when the reused expression is a temporary. 2024-04-09 09:32:54 +01:00
Mathias Vorreiter Pedersen
17c8fa3e84 Update cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2024-04-09 09:27:44 +01:00
Mathias Vorreiter Pedersen
b2002a981a C++: Use the shared typeflow library to determine whether a pointer points to a buffer or an object. 2024-04-08 21:25:05 +01:00
Mathias Vorreiter Pedersen
4fa53b63ae Merge branch 'main' into destructors-for-unconditional-unnamed 2024-04-08 15:42:35 +01:00
Mathias Vorreiter Pedersen
8a6a60e59b C++: Also handle destructor calls on converted expressions in PrintAST. 2024-04-07 15:49:50 +01:00
Mathias Vorreiter Pedersen
89eaadd76f C++: Move destructor calls from expressions with a temporary object conversion to the temporary object conversion. 2024-04-07 15:48:38 +01:00
Mathias Vorreiter Pedersen
557555eb71 C++: Make Code Scanning happy. 2024-04-05 19:03:03 +01:00
Mathias Vorreiter Pedersen
777755a241 C++: Add alias models for 'fopen'. 2024-04-05 19:02:23 +01:00
Mathias Vorreiter Pedersen
54e4103e71 C++: Fix another multiple parents problem. 2024-04-05 18:07:53 +01:00
Mathias Vorreiter Pedersen
f1d2dac648 C++: Fix a bug where the destructor attached to a 'new' expression would
have multiple parents (the 'new' expression, the call to 'operator new',
and the size expression). This happens because the latter two are
'TranslatedExpr's that return the 'new' expression as their expression
even though they don't technically represent the translation of this
expression.
To prevent this bug we tell the IR construction that the latter two
handle their destructors explicitly which means that IR construction
doesn't try to synthesize them.
2024-04-05 14:46:27 +01:00
Mathias Vorreiter Pedersen
d279e3f17a C++: Suppress destructor calls for the right-hand side of logical operations since these are also conditional. 2024-04-05 09:47:11 +01:00
Mathias Vorreiter Pedersen
f098b8eb82 C++: Make sure the edge kind out of a throw is an 'ExceptionEdge' even if destructors are called. 2024-04-04 20:01:52 +01:00
Mathias Vorreiter Pedersen
180888616b C++: Properly handle the case where a TranslatedElement has no children. 2024-04-04 16:02:01 +01:00
Mathias Vorreiter Pedersen
73602dca92 C++: Also suppress destructor calls on throwing ternary expressions. 2024-04-04 14:51:11 +01:00
Mathias Vorreiter Pedersen
796fcfec6c C++: Handle conversions in 'isInConditionalEvaluation'. 2024-04-04 14:44:16 +01:00
Mathias Vorreiter Pedersen
a756f14e77 C++: Only report implicit destructors if we need to translate them. 2024-04-04 14:41:23 +01:00
Robert Marsh
17e8c95e7f C++: suppress destructors on conditional temporaries 2024-04-04 11:28:10 +01:00
Robert Marsh
75c453fd30 C++: Unsuppress temporary destructors in IR 2024-04-04 10:29:59 +01:00
Tom Hvitved
1dc13cc169 Merge pull request #15923 from hvitved/shared-xml-impl
Properly shared `XML.qll` implementation
2024-04-03 11:39:50 +02:00
Jeroen Ketema
3c8c45872e Merge pull request #16060 from jketema/qual-fix
C++: Output destructor calls for delete expressions
2024-04-02 11:49:51 +02:00
Jeroen Ketema
01183800a6 C++: Fix formatting 2024-04-02 11:38:19 +02:00
Jeroen Ketema
9190bf25ce C++: Add example to QLDoc 2024-04-02 11:35:43 +02:00
Jeroen Ketema
a5d4fad806 C++: Output destructor calls for delete expressions 2024-04-02 10:32:03 +02:00
github-actions[bot]
8e61c6625b Post-release preparation for codeql-cli-2.17.0 2024-04-01 15:27:42 +00:00
github-actions[bot]
ec97d9a304 Release preparation for version 2.17.0 2024-04-01 13:46:57 +00:00
Jeroen Ketema
9eb51a9b9e C++: Add value category column to the expr_reuse relation 2024-03-27 22:49:40 +01:00
Mathias Vorreiter Pedersen
7bb2b57394 Merge pull request #15964 from rdmarsh2/rdmarsh2/cpp/temp-destructors-extended
C++: IR translation for destruction of temporaries with extended lifetimes
2024-03-27 11:58:48 +00:00
Jeroen Ketema
27c6e2421c C++: Add VariableTemplateInstantiation class
This adds some uniformity, as we already had `FunctionTemplateInstantiation` and
`ClassTemplateInstantiation` classes.
2024-03-27 11:35:13 +01:00
Mathias Vorreiter Pedersen
3bfaab9182 C++: Remove debugging conjunct. 2024-03-26 17:01:06 +00:00
Mathias Vorreiter Pedersen
6a8c592900 Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/FlowSteps.qll
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
2024-03-26 16:59:18 +00:00
Mathias Vorreiter Pedersen
d610d721a4 C++: Add file QLDoc. 2024-03-26 16:47:39 +00:00
Mathias Vorreiter Pedersen
e3744c435a C++: Add change note. 2024-03-26 16:44:16 +00:00
Mathias Vorreiter Pedersen
2075716df7 C++: Add 'TaintInheritingContent'. 2024-03-26 16:37:22 +00:00
Henry Mercer
0646744928 Merge branch 'main' into henrymercer/merge-back-rc-3.13 2024-03-26 12:59:12 +00:00
github-actions[bot]
f67b5f9158 Post-release preparation for codeql-cli-2.16.6 2024-03-25 18:17:15 +00:00
github-actions[bot]
71ab804274 Release preparation for version 2.16.6 2024-03-25 16:58:08 +00:00